- 好友
- 分享
- 精华
- 阅读权限
- 200
- 注册时间
- 2017-8-17
|
楼主 |
发表于 2022-4-17 23:44:20
|
显示全部楼层
获取帖子附件列表
| 接口说明: | 获取帖子附件列表,如已购买则显示下载地址。 |
接口详情 | 请求地址: | http://demo35.xinxiuvip.com/plugin.php?id=xinxiuvip_network_plugin:forum | 请求方式: | GET | 返回格式: | JSON\XML /*默认返回JSON格式,如需返回XML格式,请在接口网址后面增加&output=xml参数*/ |
请求参数(所有参数值均URL加密后传输【注意GBK与UTF8编码区别】) | 参数 | 类型 | 是否必含 | 说明 | 示例 | token | [string] | 是 | token令牌 | 1487rJ3_xinxiu_jVyxdJsrWhblH4bmJ_xinxiu_gVqFiP5RE0
rPDjjh6vbTTi_xin_xiu_A3MtXSE4bfzIw0XVnDE | action | [string] | 是 | 接口方法 | forum_by_tid_attachment | tid | [string] | 是 | 主题帖tid | 52 | start | [string] | 否 | 起始数据编号,默认0,可为空 | 0 | limit | [string] | 否 | 返回数量,默认10条,可为空 | 5 | sort | [string] | 否 | 排序(DESC为降序、ASC升序) | DESC |
请求示例(GET) | - http://demo35.xinxiuvip.com/plugin.php?id=xinxiuvip_network_plugin:forum&token={token令牌}&action=forum_by_tid_attachment&tid=52
复制代码 |
返回参数(所有接口返回数据含中文时“\u672c\u6846”,请用USC2进行解码) | 参数 | 类型 | 是否必含 | 说明 | 示例 | code | [number] | 是 | http状态码 | 200 | result | [string] | 是 | 错误信息状态码 | OK | count | [number] | 是 | 数组成员数 | 7 | data | [object] | 是 | 数组 | | data>>aid | [string] | 是 | 附件aid,附件唯一标识id,用户其他附件接口操作参数 | 3 | data>>tid | [string] | 是 | 主题帖tid | 52 | data>>pid | [string] | 是 | 帖子pid | 90 | data>>uid | [string] | 是 | 用户uid | 1 | data>>tableid | [string] | 是 | 附件表id | 2 | data>>downloads | [string] | 是 | 下载次数 | 6 | data>>dateline | [string] | 是 | 上传时间 | 1619593226 | data>>filename | [string] | 是 | 附件名称 | 接口开发dev_demo文件.zip | data>>attachment | [string] | 是 | 下载地址,已购买显示下载地址,未购买显示“0”;
全地址路径前面加上:demo.xinxiuvip.com/data/attachment/forum/
| 202104/28/070026njmq8t17lpznqq9o.zip | data>>remote | [string] | 是 | 是否远程附件 | 0 | data>>description | [string] | 是 | 附件名描述 | 0 | data>>readperm | [string] | 是 | 阅读权限 | 这里是描述 | data>>price | [string] | 是 | 附件价格 | 20 | data>>isimage | [string] | 是 | 是否为图片 | 0 | data>>filesize | [string] | 是 | 文件大小 | 4062 | data>>counts | [string] | 是 | 搜索结果总条数 | 5 | sqltime | [string] | 是 | 页面执行时间(秒) | 0.00749s |
返回示例(JSON) | - {
- "code": 200,
- "result": "OK",
- "count": 4,
- "data": {
- "3": {
- "aid": "3",
- "tid": "52",
- "pid": "90",
- "uid": "1",
- "tableid": "2",
- "downloads": "6",
- "dateline": "1619593226",
- "filename": "接口开发dev_demo文件.zip",
- "filesize": "4062",
- "attachment": "202104/28/070026njmq8t17lpznqq9o.zip",
- "remote": "0",
- "description": "这里是描述",
- "readperm": "0",
- "price": "20",
- "isimage": "0",
- "width": "0",
- "thumb": "0",
- "picid": "0"
- },
- "4": {
- "aid": "4",
- "tid": "52",
- "pid": "90",
- "uid": "1",
- "tableid": "2",
- "downloads": "8",
- "dateline": "1619593248",
- "filename": "接口开发dev_demo文件.zip",
- "filesize": "4062",
- "attachment": "0",
- "remote": "0",
- "description": "这里也是描述",
- "readperm": "0",
- "price": "10",
- "isimage": "0",
- "width": "0",
- "thumb": "0",
- "picid": "0"
- },
- "5": {
- "aid": "5",
- "tid": "52",
- "pid": "101",
- "uid": "1",
- "tableid": "2",
- "downloads": "1",
- "dateline": "1620826717",
- "filename": "1.txt",
- "filesize": "12",
- "attachment": "0",
- "remote": "0",
- "description": "",
- "readperm": "0",
- "price": "30",
- "isimage": "0",
- "width": "0",
- "thumb": "0",
- "picid": "0"
- },
- "7": {
- "aid": "7",
- "tid": "52",
- "pid": "101",
- "uid": "1",
- "tableid": "2",
- "downloads": "1",
- "dateline": "1620826712",
- "filename": "1.txt",
- "filesize": "12",
- "attachment": "0",
- "remote": "0",
- "description": "",
- "readperm": "0",
- "price": "30",
- "isimage": "0",
- "width": "0",
- "thumb": "0",
- "picid": "0"
- }
- },
- "sqltime": "0.00383s"
- }
复制代码 |
错误提示码 | 错误码查询地址:点击访问 | BUG提交:点击提交 | QQ交流群:281079920 |
|
|