获取作者信息接口
接口地址
http://www.brighttj.com/api/index.php/api/user/userById
请求方式
GET / POST
入参
参数名称 | 参数含义 | 参数类型 | 是否必须 | 备注 |
---|---|---|---|---|
categoryId | 获取某个分类中的热门文章 | int | 否 | 不传则代表所有分类 |
articleCount | 获得几篇热门文章 | int | 否 | 默认10条 |
出参
{
"data":{
"userList":[
{
"id":"3",
"name":"唐嘉蓉",
"email":"[email protected]",
"github":"saitjr",
"articleCount":"75",
"recentArticles":[
{
"id":"1290",
"date":"2015-10-21 22:24:26",
"title":"【iOS】49.小项目框架设计(ReactiveCocoa+MVVM+AFNetworking+FMDB)",
"commentCount":"0",
"views":"164",
"author":
{
"name":"唐嘉蓉",
"id":"3"
},
"categorys":[
{
"id":"49",
"name":"ios",
"count":"52"
}]
}
}]
},
"msg":"读取成功",
"status":1
}
字段解析
参数名称 | 参数含义 | 参数类型 |
---|---|---|
userList | 用户信息列表 | array |
id | 用户id | int |
name | 用户姓名 | string |
用户邮箱 | string | |
github | 用户Github标识 | string |
articleCount | 发布的文章数量 | int |
recentArticles | 最近文章列表 | array |