博客系统后台接口:
1,登录:
请求方式:post
http://192.168.1.102:8080/mobilelogin
请求参数:
RequestParams params = new RequestParams();
params.put("username", "kuangyao");
params.put("password", "panda0920");
响应参数:
model.put("resultCode", "200");
model.put("message", "登陆成功");
2,注册:
请求方式:Post
http://192.168.1.102:8080/mobileRegister
请求参数:
RequestParams params = new RequestParams();
params.put("username", "kuangyao333");
params.put("name", "panda0920");
params.put("email", "panda0920@qq.com");
params.put("password", "panda0920");
params.put("password2", "panda0920");
响应参数:
model.put("resultCode", "200");
model.put("message", "注册成功");
3,退出:
请求方式:Post
http://192.168.1.102:8080/mobilelogout
响应参数:
model.put("resultCode", "200");
model.put("message", "退出成功");
4,修改头像:
请求方式:Post
http://192.168.1.102:8080/account/mobileAvatar
5,修改密码:
请求方式:Post
http://localhost:8080/account/mobilePassword
请求参数:
oldPassword = panda0920
password = panda0921
//password2 = panda0921
响应参数:
model.put("resultCode", "200");
model.put("message", "操作成功");
6,修改邮箱<暂无>:
请求方式:Post
http://192.168.1.102:8080/
7,全局查询:
请求方式:Get
http://localhost:8080/browse/mobileSearch
请求参数:
params.put("q", "张三");
响应参数:
model.put("resultCode", "200");
model.put("message", "查询成功");
model.put("page", page.toString());
8,首页(动态)内容:
请求方式:Get
http://localhost:8080/mobileHome
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "主页数据请求成功");
model.put("page", paging.toString());
model.put("user", user.toString());
9,首页 我发布过的文章:
请求方式:Get
http://localhost:8080/mobileHome?method=mobileHomePosts
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我发布的文章请求成功");
model.put("page", page.toString());
model.put("user", user.toString());
10,首页 我的评论:
请求方式:Get
http://localhost:8080/mobileHome?method=mobileComments
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我发表的评论获取成功");
model.put("page", page.toString());
model.put("user", user.toString());
11,首页 我的喜欢:
请求方式:Get
http://localhost:8080/mobileHome/mobileFavors
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我喜欢过的文章获取成功");
model.put("page", page.toString());
model.put("user", user.toString());
12,首页 我的关注:
请求方式:Get
http://localhost:8080/home/follows
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我关注过的文章获取成功");
model.put("page", page.toString());
model.put("user", user.toString());
13,首页 我的粉丝:
请求方式:Get
http://localhost:8080/mobileHome/mobileFans
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我的粉丝获取成功");
model.put("page", page.toString());
model.put("user", user.toString());
14,首页 我的通知:
请求方式:Get
http://localhost:8080/mobileHome/mobileNotifies
请求参数:
响应参数:
model.put("resultCode", "200");
model.put("message", "我的通知获取成功");
model.put("page", page.toString());
model.put("user", user.toString());
15,主页 最新动态:
请求方式:Get
http://localhost:8080/mobileIndex/
请求参数:
params.put("ord", "newest");
响应参数:
model.put("resultCode", "200");
model.put("message", "首页列表请求成功");
model.put("ord", order);
16,主页 最热动态:
请求方式:Get
http://localhost:8080/mobileIndex/
请求参数:
params.put("ord", "hottest");
响应参数:
model.put("resultCode", "200");
model.put("message", "首页列表请求成功");
model.put("ord", order);
17,文章 最新文章:
请求方式:Get
http://localhost:8080/group/blog?ord=newest
18,文章 最热文章:
请求方式:Get
http://localhost:8080/g/blog?ord=hottest
19,通用接口 热门文章:
请求方式:Get
http://localhost:8080/api/hots.json?maxResults=10
返回参数:
List<Post> rets
20,通用接口 最新发布:
请求方式:Get
http://localhost:8080/api/latests.json?maxResults=10
返回参数:
List<Post> rets
21,通用接口 最热标签:
请求方式:Get
http://localhost:8080/api/hot_tags.json?maxResults=10
返回参数:
List<Tag> rets
22,通用接口 最热用户:
请求方式:Get
http://localhost:8080/api/Userfans.json?maxResults=10
请求参数:
响应参数:
List<User> rets
23,视频:
请求方式:Get
http://localhost:8080/g/video
24,问答 最新问答:
请求方式:Post
http://localhost:8080/g/ask?ord=newest
25,问答 最热问答:
请求方式:Post
http://localhost:8080/g/ask?ord=newest
26,发现 :
请求方式:Get
http://localhost:8080/tags
27,走廊:
请求方式:Get
http://localhost:8080/gallery?g=2
28,评论列表:
请求方式:Get
http://localhost:8080/comment/list/18.json?maxResults=6&pn=1
请求响应:
Paging page
29,文章详情:
请求方式:Get
http://localhost:8080/view/18
30,个人资料:
请求方式:Get
http://localhost:8080/mobileTa/14
响应参数:
model.put("resultCode", "200");
model.put("message", "获取他人用户资料成功");
model.put("user", user.toString());
model.put("page", page.toString());
31,关注个人:
请求方式:Get
http://localhost:8080/account/mobileFollow.json?id=13
响应参数:
model.put("resultCode", "200");
model.put("message", "关注成功");
32,喜欢文章:
请求方式:Post
http://localhost:8080/account/mobileFavor
请求参数:
id = 16
响应参数:
model.put("resultCode", "200");
model.put("message", "添加喜欢成功");
33,评论文章:
请求方式:Post
http://localhost:8080/comment/submit.json
请求参数:
toId=16&pid=0&text=%E5%BC%A0%E4%B8%89%E6%9D%8E%E5%9B%9B%E7%8E%8B%E4%BA%8C%E9%BA%BB%E5%AD%90
响应参数:
{
"code": 0,
"message": "发表成功!",
"data": []
}
34,标签:
请求方式:Get
http://localhost:8080/tag/%E7%94%B5%E5%BD%B1/
toId=16&pid=0&text=%E5%BC%A0%E4%B8%89%E6%9D%8E%E5%9B%9B%E7%8E%8B%E4%BA%8C%E9%BA%BB%E5%AD%90
响应参数:
{
"code": 0,
"message": "发表成功!",
"data": []
}
35,找回密码:
请求方式:Get
http://localhost:8080/forgot/apply
请求参数:
username = pengdan120
响应参数:
model.put("resultCode", "200");
model.put("message", "邮件发送成功");
36,取消喜欢文章:
请求方式:Post
http://localhost:8080/account/mobileUnfavor
请求参数:
id = 16
响应参数:
model.put("resultCode", "200");
model.put("message", "取消喜欢成功");
37,关注个人:
请求方式:Get
http://localhost:8080/account/mobileUnfollow.json?id=13
响应参数:
model.put("resultCode", "200");
model.put("message", "取消关注成功");