[关闭]
@zhuoming 2016-11-17T07:38:49.000000Z 字数 4088 阅读 726

火柴盒接口文档

  1. 列表项

iOS MB



特别说明

baseURL 118.192.147.148:80

没有特殊说明均为字符串类型

对于可能返回数组类型的接口 如获取最新话题、获取最热帖子可加上一些分页参数

参数 类型 说明
pageModel.pageSize int 分页标签每页显示多少条
pageModel.pageIndex int 分页标签第几页,从1开始

用户

1.注册

/Matchbox/userregist

字段名 字段 字段解释
user.passWord 密码
user.name 手机号

返回结果说明

result 0 为注册成功 1为密码不能为空 2为手机号不能为空

2.登录

/Matchbox/useruserlogin

字段名 字段 字段解释
password 密码
name 手机号

返回结果说明

result 0 时登陆成功 并返回 url-头像 username-昵称 sex-性别 myInfo-介绍
1为用户名或密码错误
2 用户名或密码为空

3.根据用户id获取个人资料

/Matchbox/usergetUserInfoById

字段名 字段 字段解释
userId 用户ID

返回结果说明

  1. {
  2. "result":"0",
  3. "sex":"男",//性别
  4. "userId":1,//用户id
  5. "name":"13660169431",//登陆名
  6. "userName":"小王",//用户名
  7. "myActionCount":"0",//我关注的
  8. "fansCount":"0",//粉丝数
  9. "url":"/img/123.jpg",//头像
  10. "myInfo":"个人资料"
  11. }

4.修改个人资料

/Matchbox/userupdateUserInfo

字段名 字段 字段解释
doc 头像 文件类型
user.id 用户ID 登陆者的ID
user.userName 用户名 昵称
user.sex 性别 字符串类型
user.myInfo 个人介绍 字符串类型

返回结果说明

5.重置密码

/Matchbox/userupdatePassWordByUserId

字段名 字段解释
oldPassWord 旧密码
newPassWord 新密码
userId 用户ID

返回结果说明


主题

1.创建主题

/Matchbox/usersaveTopic

字段名 字段 字段解释
name 话题名称
userId 用户ID

返回说明

这个接口有问题,创建成功没有返回 -- 3月24下午,其他如参数缺少等错误则返回正常

2.获取话题

/Matchbox/usergetTopicList

字段名 字段 字段解释
userId 用户ID

返回说明

  1. {
  2. "message":"获取成功",
  3. "result":"0",
  4. "list":[//话题list
  5. {
  6. "name":"我去",//
  7. "topicId":2,//话题id
  8. "seeCount":1242//浏览数
  9. },
  10. {
  11. "name":"话题名啊",
  12. "topicId":1,
  13. "seeCount":1
  14. }
  15. ]
  16. }

2.获取帖子

/Matchbox/usergetFriendCircles

字段名 字段 字段解释
userId 用户ID
topicId 话题ID

返回说明

  1. {
  2. "result":"0",
  3. "List":[//帖子list
  4. {
  5. "isAction":0,//是否关注作者
  6. "type":2, //2为图片的文章 1为纯文字 photoList为空
  7. "msg":"???",//文章正文
  8. "photoList":[//图片
  9. {
  10. "imgUrl":"/img/123.jpg",//略显图
  11. "url":"/img/123.jpg"//原图
  12. }
  13. ],
  14. "topicId",1;
  15. "topicName","话题";
  16. "friendId":1,//帖子id
  17. "topCount":0,//点赞数
  18. "shareCount":1,//分享数
  19. "imgUrl":"http://223.202.123.116/BalanceCar//img/123.jpg",//用户头像
  20. "isCollection":0,//是否收藏
  21. "userId":1,//发布者id
  22. "userName":"小王",
  23. "isTop":0,//是否点赞
  24. "createDate":"2016-03-06 16:51:28",
  25. "discussCount":0
  26. }
  27. ]
  28. }

3.发布帖子

/Matchbox/userpostFriendCircle

字段名 字段解释
type 为1时发布纯文本 2为带图的文章
pic 当type 为2时 传pic 文件类型的图片
friendCircle.user.id 用户ID
friendCircle.topic.id 话题ID
friendCircle.msg 帖子内容

返回说明

4.点赞

/Matchbox/useraddTopForFriend

字段名 字段解释
userId 用户id
friendId 帖子id

返回说明

5.取消赞

/Matchbox/usercancleTop

字段名 字段解释
userId 用户id
friendId 帖子id

返回说明

6.关注帖子

/Matchbox/useraddCollection

字段名 字段解释
collection.user.id 用户id
collection.friendCircle.id 帖子ID

返回说明

7.取消关住帖子

/Matchbox/usercanclecollection

字段名 字段解释
collection.user.id 用户id
collection.friendCircle.id 帖子ID

返回说明

7.搜索话题

/Matchbox/usergetTopicList

字段名 字段解释
userId 用户id
user.name 搜索的关键字

返回说明

  1. {
  2. "message":"获取成功",
  3. "result":"0",
  4. "list":[//话题list
  5. {
  6. "name":"我去",//
  7. "topicId":2,//话题id
  8. "seeCount":1242//浏览数
  9. },
  10. {
  11. "name":"话题名啊",
  12. "topicId":1,
  13. "seeCount":1
  14. }
  15. ]
  16. }

8.获取热门话题

/Matchbox/usergetTopicListHot

字段名 字段解释
userId 用户id(暂时没用)

返回说明

  1. {
  2. "message":"获取成功",
  3. "result":"0",
  4. "list":[//话题list
  5. {
  6. "name":"我去",//
  7. "topicId":2,//话题id
  8. "seeCount":1242//浏览数
  9. },
  10. {
  11. "name":"话题名啊",
  12. "topicId":1,
  13. "seeCount":1
  14. }
  15. ]
  16. }

9.获取最新话题

/Matchbox/usergetTopicListNew

字段名 字段解释
userId 用户id(暂时没用)

返回说明

  1. {
  2. "message":"获取成功",
  3. "result":"0",
  4. "list":[//话题list
  5. {
  6. "name":"我去",//
  7. "topicId":2,//话题id
  8. "seeCount":1242//浏览数
  9. },
  10. {
  11. "name":"话题名啊",
  12. "topicId":1,
  13. "seeCount":1
  14. }
  15. ]
  16. }

10.获取话题里面最新或最热的帖子

/Matchbox/usergetHotOrNewFriendCircles

字段名 字段解释
userId 用户id
topicId 被关在者ID
type 1为最新、2为最热

返回说明


好友

1.关注好友

/Matchbox/useraddFocus

字段名 字段解释
friend.user.id 用户id
friend.beuser.id 被关在者ID

返回说明

2.取消关注

/Matchbox/usercancleFocus

字段名 字段解释
friend.user.id 用户id
friend.beuser.id 被关在者ID

返回说明

3.获取关注我的粉丝

/Matchbox/usergetMyFans

字段名 字段解释
userId 用户id

返回说明

  1. {
  2. "result": "0",
  3. "Firends": [
  4. {
  5. "name": "13660169431", //用户手机
  6. "userName": "Mr.",//昵称
  7. "userId": 3,//id
  8. "url": "/photo/8af98075-8494-4a4b-a18b-e7f4b1f66d58.jpg",//头像
  9. "info": "Wang"//个性签名
  10. }
  11. ]
  12. }

4.获取我关注的

/Matchbox/usergetMyAction

字段名 字段解释
userId 用户id

返回说明

  1. {
  2. "result": "0",
  3. "Firends": [
  4. {
  5. "name": "13660169431",
  6. "userName": "Mr.",
  7. "userId": 3,
  8. "url": "/photo/8af98075-8494-4a4b-a18b-e7f4b1f66d58.jpg",
  9. "info": "Wang"
  10. }
  11. ]
  12. }

系统

1.广告

/Matchbox/usergetBannerList
返回说明

暂无

  1. {
  2. "result":"0",
  3. "List":[
  4. {
  5. "url":"/img.jpg",
  6. "info":"1"
  7. },
  8. {
  9. "url":"/img.jpg",
  10. "info":"2"
  11. },
  12. {
  13. "url":"/img.jpg",
  14. "info":"3"
  15. },
  16. {
  17. "url":"/img.jpg",
  18. "info":"4"
  19. }
  20. ]
  21. }

第三方登录

/Matchbox/userotherLogin

字段名 字段解释
loginType 登录方式
appToken 第三方uuid
url 头像
username 用户名

返回说明

  1. 新研科技教育
  2. AppIDwx7ccf84096d52e8b1
  3. AppSecret8a27f5b6f2ae566cde041348b455626d
  4. 已通过
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注