文档搜索
1 功能说明
搜索符合条件文档列表
2 接口调用说明
2.1 URL
http://yourdomain.kf5.com/api/v1/forum/post_search2.2 格式
JSON
2.3 HTTP请求方式
GET, POST
2.4 IP限制
无
2.5 输入参数说明
| 参数名称 | 是否必须 | 类型 | 描述 | 
| keyword | 是 | string | 文档的搜索关键词 | 
| currentpage | 否 | integer | 当前显示的数据页数,默认为1,表示第一页 | 
| pagesize | 否 | integer | 每页显示的记录条数,默认为20条 | 
2.6 请求示例
http://yourdomain.kf5.com/api/v1/forum/post_search?keyword=test&sign=12d45c66523dd069d7c64c22fea10f34
2.7 返回参数说明
| 参数名称 | 说明 | 
| err | 返回码。0:执行成功,1:有错误 | 
| msg | 如果错误,返回错误信息。 | 
| count | 数据记录的总条数 | 
| currentpage | 当前显示的数据页数 | 
| pagesize | 每页显示的记录条数 | 
| datas | 返回数据 | 
| id | 文档编号 | 
| forum_id | 所属分类编号 | 
| title | 文档标题 | 
| content | 文档描述 | 
| user_id | 作者编号 | 
| disable_comments | 回复是否关闭 | 
| is_top | 是否置顶显示 | 
| is_dashboard | 是否在控制台首页显示 | 
| created | 创建时间 | 
| updated | 最后修改时间 | 
| count_view | 浏览量 | 
| count_comment | 评论总数 | 
2.8 正确返回示例
Content-type: text/html; charset=utf-8
{
	"err":0,
	"msg":"",
	"count":"47",
	"currentpage":"1",
	"pagesize":"20",
	"datas":{
		"0" : {
			"id" : "165"
			"forum_id" : "418"
			"title" : "test"
			"content" : "testtest"
			"user_id" : "733"
			"disable_comments" : "0"
			"is_top" : "1"
			"is_dashboard" : "0"
			"created" : "1351064099"
			"updated" : "1351064099"
			"count_view" : "28"
			"count_comment" : "4"
		}
		...
	}
}2.9 错误返回示例
Content-type: text/html; charset=utf-8
{
	"err":1,
	"msg":"参数不完整"
}3 备注
无
