- 好友
- 分享
- 精华
- 阅读权限
- 255
- 注册时间
- 2017-8-17
|
楼主 |
发表于 2022-5-5 12:59:40
|
显示全部楼层
接口详情 | 请求地址: | http://demo.xinxiuvip.com/plugin.php?id=xinxiu_network_plugin:search | 请求方式: | GET | 返回格式: | JSON\XML /*默认返回JSON格式,如需返回XML格式,请在接口网址后面增加&output=xml参数*/ |
请求参数(所有参数值均URL加密后传输【注意GBK与UTF8编码区别】) | 参数 | 类型 | 是否必含 | 说明 | 示例 | key | [string] | 是 | 传输密钥 | 123456 | action | [string] | 是 | 接口方法 | search_forum | rule | [string] | 是 | 搜索标题关键字;
接口规则“或”和“且”用“|”分开,多关键字用“-”分开 | 例:标-的|标-题(包含标或的,且必须包含标和题)
例:标题 (搜索包含标题的帖子)
例:标题-发现(搜索包含标题或发现的帖子) | sort | [string] | 否 | 排序,默认降序,ASC=升序 | ASC | start | [string] | 否 | 起始数据编号 | 0 | limit | [string] | 否 | 获取数据条数 | 10 | full | [string] | 否 | 是否开启全文搜索 | 1 为开启全文搜索,0为标题搜索,默认为0 | token | [string] | 否 | token令牌 | 查询是否回帖,回帖则显示隐藏内容,如果未回帖或为空则不显示隐藏内容。
针对帖子 hide 标签生效。 |
请求示例(GET) | - http://demo.xinxiuvip.com/plugin.php?id=xinxiu_network_plugin:search&key={传输密钥}&action=search_forum&rule=标-的|标-题&field=tid,fid,author,authorid,subject,dateline&start=0&limit=10&sort=ASC
复制代码 |
返回参数(所有接口返回数据含中文时“\u672c\u6846”,请用USC2进行解码) | 参数 | 类型 | 是否必含 | 说明 | 示例 | code | [number] | 是 | http状态码 | 200 | result | [string] | 是 | 错误信息状态码 | OK | count | [number] | 是 | 数组成员数 | 11 | data | [object] | 是 | 数组 | | data>>0 | [object] | 是 | 数组编号 | 0 | data>>0>>tid | [string] | 是 | 帖子tid | 27 | data>>0>>fid | [string] | 是 | 帖子fid | 2 | data>>0>>author | [string] | 是 | 用户名 | admin | data>>0>>authorid | [string] | 是 | 用户uid | 1 | data>>0>>subject | [string] | 是 | 帖子标题 | 我要发帖子标题了 | data>>0>>dateline | [string] | 是 | 发帖时间 | 1585204892 | data>>counts | [string] | 是 | 搜索结果总条数 | 25 | sqltime | [string] | 是 | 页面执行时间(秒) | 0.0064s |
返回示例(JSON) | - {
- "code": 200,
- "result": "OK",
- "count": 11,
- "data": {
- "0": {
- "tid": "27",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "我要发帖子标题了",
- "dateline": "1585204892"
- },
- "1": {
- "tid": "28",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585293054"
- },
- "2": {
- "tid": "29",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585293181"
- },
- "3": {
- "tid": "30",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585293276"
- },
- "4": {
- "tid": "31",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585293346"
- },
- "5": {
- "tid": "32",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585294251"
- },
- "6": {
- "tid": "33",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585989717"
- },
- "7": {
- "tid": "34",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585990970"
- },
- "8": {
- "tid": "35",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585991263"
- },
- "9": {
- "tid": "36",
- "fid": "2",
- "author": "admin",
- "authorid": "1",
- "subject": "标题",
- "dateline": "1585991266"
- },
- "counts": 25
- },
- "sqltime": "0.00961s"
- }
复制代码 |
额外说明 | pre_forum_post 帖子表 | | | | | | | |
| NO |
| 帖子id | | | | |
| 论坛id | | | | |
| 主题id | | | | |
| 是否是首贴 | | |
| NO |
| 作者姓名 | | | | |
| 作者id | | |
| NO |
| 标题 | | | | |
| 发表时间 | | |
| NO |
| 消息 | | |
| NO |
| 发帖者IP | | | | |
| 是否通过审核 | | | | |
| 是否匿名 | | | | |
| 是否启用签名 | | | | |
| 是否允许HTML | | | | |
| 是否关闭BBCODE | | | | |
| 是否关闭表情 | | | | |
| 是否允许粘贴URL | | | | |
| 附件 | | | | |
| 评分分数 | | | | |
| 评分次数 | | | | |
| 帖子状态 | | | | |
| 新增字段,用于存放tag | | | | |
| 是否存在点评 | | | | |
| 回帖获得积分记录 | | |
| NO | | |
|
错误提示码 | 错误码查询地址:点击访问 | BUG提交:点击提交 | QQ交流群:281079920 |
|
|