##S-Training 文档
####目录
####
1. 业务对象
|名称|作用|规范|
|:--|:--|:---------------------------|
|domain|数据库模型|类型与数据库表一致,不涉及任何业务具体要求,用于数据库基本操作|
|entity|业务层基本模型|业务层具体操作对象|
|info|DTO|接口层基本操作对象,只能向外输出|
|params|DTO|接口层基本操作对象,只能向内输入 _tips:当输入参数个数较少,不应使用params_|
|caps|持久化层操作|数据库基本操作,不涉及具体业务,只允许条件选择,不允许分页操作|
|core|业务层|业务具体实现|
|service|业务接口层|只向外暴露服务接口,不做任何处理|
|reference|接口层-业务层 连接模型|连接对象|
|page|接口层|对客户端暴露接口,兼容接口的升级|
|名称|作用|规范|
|:--|:--|:---------------------------|
|domain|数据库模型|类型与数据库表一致,不涉及任何业务具体要求,用于数据库基本操作|
|entity|业务层基本模型|业务层具体操作对象|
|info|DTO|接口层基本操作对象,只能向外输出|
|params|DTO|接口层基本操作对象,只能向内输入 _tips:当输入参数个数较少,不应使用params_|
|caps|持久化层操作|数据库基本操作,不涉及具体业务,只允许条件选择,不允许分页操作|
|core|业务层|业务具体实现|
|service|业务接口层|只向外暴露服务接口,不做任何处理|
|reference|接口层-业务层 连接模型|连接对象|
|page|接口层|对客户端暴露接口,兼容接口的升级|
1. [用户相关](#user_api_list) 2. [通讯相关](#contact_api_list) 3. [健身相关](#training_api_list) 4. [文章相关](#article_api_list) 5. [动态相关](#moment_api_list) 6. [图片相关](#pic_api_list) 7. [socket相关](#socket_list)
####
- /user/account/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
phone | String | 13512371174 | required | 11位注册手机 |
password | String | songming | required | 12位登陆密码 |
{
"key": "123461291691941629719",
"userID": 100312312,
"ts": 1461498240688,
"status": 1
}
####
- /user/login/phone
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
phone | String | 13512371174 | * | 11位注册手机 |
password | String | songming | * | 12位登陆密码 |
{
"key": "123461291691941629719",
"userID": 100312312,
"ts": 1461498240688,
"status": 1
}
####
- /user/detail
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
target_user_id | long | 212312313 | * | 用户ID |
{
"user": {
"userID": 1123131,
"username": "chensongming",
"signNature": "helloworld",
"phone": "13581372272",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 1,
"rank": 100,
"score": 3000,
"canEdit": 1
},
"ts": 1461502571545,
"status": 1
}
user.status: 状态 1.正常 2.删除 回到目录
####
- /user/detail/update
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
username | String | chensongming | 用户名 | |
password | String | 212312313 | 用户密码 | |
sign_nature | String | 212312313 | 用户签名 | |
avatar | String | 212312313.jpg | 用户头像上传的文件名 |
{
"ts": 1461503997138,
"status": 1
}
####
- /user/list/follow
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
{
"users": [
{
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "13580122279",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
},
{
"userID": 10000002,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "13512377777",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
}
],
"start": "",
"more": 0,
"ts": 1461504372343,
"status": 1
}
回到目录 ####
- /user/list/rank
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
{
"users": [
{
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "13580122279",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
},
{
"userID": 10000002,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "13512377777",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
}
],
"start": "",
"more": 0,
"ts": 1461504372343,
"status": 1
}
####
- /contact/follow
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
target_id | long | 1231231231231 | * | 添加好友的ID |
{
"ts": 1461504372343,
"status": 1
}
####
- /contact/unfollow
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
target_id | long | 1231231231231 | * | 添加好友的ID |
{
"ts": 1461504372343,
"status": 1
}
####
- /contact/group/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
member_ids | String | 1231231231231,12311,1312 | * | 成员ID集合,用逗号分割,要包含创建者ID |
{
"group": {
"groupID": 9,
"groupName": "陈松铭LA",
"memberCount": 2,
"members": [
{
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "13512372279",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
},
{
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
}
]
},
"ts": 1461505899740,
"status": 1
}
####
- /contact/group/detail
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
group_id | long | 12311 | * | 群ID |
{
"group": {
"groupID": 9,
"groupName": "陈松铭LA",
"memberCount": 2,
"members": [
{
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "13512372279",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
},
{
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"rank": 0,
"score": 0
}
]
},
"ts": 1461505899740,
"status": 1
}
####
- /contact/group/list
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
{
"groups": [
{
"groupID": 8,
"groupName": "chensongming",
"memberCount": 2,
},
{
"groupID": 9,
"groupName": "陈松铭LA",
"memberCount": 2,
}
],
"start": "",
"more": 0,
"ts": 1461506485569,
"status": 1
}
####
- /contact/group/quit
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
group_id | long | 12311 | * | 群ID |
{
"ts": 1461506485569,
"status": 1
}
####
- /training/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
type | int | 12311 | * | 运动类型 |
location | int | 12311 | * | 运动地点类型 |
drinking | int | 12311 | * | 运动饮料类型 |
gear | int | 12311 | * | 运动护具类型 |
begin_at | long | 12311 | * | 开始时间 |
preset_count | int | 12311 | * | 预设个数 |
preset_group | int | 12311 | * | 预设组数 |
per_breaktime | int | 12311 | * | 预设平均休息时间 |
{
"training": {
"trainingID": 9,
"userID": 10000000,
"type": 1,
"beginAt": 1461470371000,
"finishAt": 0,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 0,
"actualGroup": 0,
"actualBreakTime": 0,
"actualConsumTime": 0,
"status": 1,
"createAt": 1461507067000,
"content": "运动目标: \n在 8 组内完成 80 个 伏地挺身;\n由于你在 室外/操场 环境中,并平均休息 30 秒;\n同时你选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n根据你实际的完成结果来最终评定你的得分",
"title": "伏地挺身 #8G-80",
"isSuccess": 0,
"items": []
},
"ts": 1461507067597,
"status": 1
}
training.status 状态:1.创建 2.开始 3.结束 training.isSuccess 0:未达成目标 1:达成
####
- /training/detail
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
training_id | long | 12311 | * | 运动任务ID |
{
"training": {
"trainingID": 9,
"userID": 10000000,
"type": 1,
"beginAt": 1461470371000,
"finishAt": 1461507554000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461507067000,
"content": "运动预设目标: \n在 8 组内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-80",
"isSuccess": 1,
"items": [
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
},
{
"count": 8,
"breakTime": 30
}
]
},
"ts": 1461507592571,
"status": 1
}
training.status 状态:1.创建 2.开始 3.结束 training.isSuccess 0:未达成目标 1:达成
####
- /training/finish
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
training_id | long | 12311 | * | 运动任务ID |
consum_time | int | 12311 | * | 实际总耗时:秒 |
training_items | int | 8-30,8-30,8-30,8-30,8-30,8-30,8-30,8-30,8-30,8-30 | * | 实际每组个数及休息时间 个数-休息时间,用逗号隔开 |
{
"ts": 1461507554128,
"status": 1
}
####
- /training/list
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
target_user_id | long | 12311 | * | 目标userID |
start | long | 12311 | * | 分页起始页,首页为0 |
count | int | 20 | * | 每页大小 |
{
"trainings": [
{
"trainingID": 9,
"userID": 10000000,
"type": 1,
"beginAt": 1461470371000,
"finishAt": 1461507554000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461507067000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 8,
"userID": 10000000,
"type": 1,
"beginAt": 1461474495000,
"finishAt": 1461474502000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461474481000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 7,
"userID": 10000000,
"type": 1,
"beginAt": 1461473681000,
"finishAt": 1461473687000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461473673000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 6,
"userID": 10000000,
"type": 1,
"beginAt": 1461473632000,
"finishAt": 1461473637000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461473626000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 5,
"userID": 10000000,
"type": 1,
"beginAt": 1461473096000,
"finishAt": 1461473105000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461473087000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 4,
"userID": 10000000,
"type": 1,
"beginAt": 1461473027000,
"finishAt": 1461473050000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461473003000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 3,
"userID": 10000000,
"type": 1,
"beginAt": 1461472424000,
"finishAt": 1461472874000,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 80,
"actualGroup": 10,
"actualBreakTime": 300,
"actualConsumTime": 500,
"status": 3,
"createAt": 1461472105000,
"content": "运动预设目标: \n在 8 内完成 80 个 伏地挺身;\n选择 室外/操场 环境,计划平均休息 30 秒;\n选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n",
"title": "伏地挺身 #8G-640",
"isSuccess": 1,
"items": []
},
{
"trainingID": 2,
"userID": 10000000,
"type": 1,
"beginAt": 1461470371000,
"finishAt": 0,
"presetCount": 80,
"presetGroup": 8,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 0,
"actualGroup": 0,
"actualBreakTime": 0,
"actualConsumTime": 0,
"status": 1,
"createAt": 1461471753000,
"content": "运动目标: \n在 8 内完成 80 个 伏地挺身;\n由于你在 室外/操场 环境中,并平均休息 30 秒;\n同时你选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n根据你实际的完成结果来最终评定你的得分",
"title": "伏地挺身 #8G-640",
"isSuccess": 0,
"items": []
},
{
"trainingID": 1,
"userID": 10000000,
"type": 1,
"beginAt": 1461470371000,
"finishAt": 0,
"presetCount": 80,
"presetGroup": 30,
"perBreakTime": 30,
"location": 1,
"drinking": 1,
"gear": 1,
"actualCount": 0,
"actualGroup": 0,
"actualBreakTime": 0,
"actualConsumTime": 0,
"status": 1,
"createAt": 1461470431000,
"content": "运动目标: \n在 30 内完成 80 个 伏地挺身;\n由于你在 室外/操场 环境中,并平均休息 30 秒;\n同时你选择使用 NIKE 护具和 肌肉科技 作为能量补充;\n根据你实际的完成结果来最终评定你的得分",
"title": "伏地挺身 #30G-2400",
"isSuccess": 0,
"items": []
}
],
"start": "1",
"more": 0,
"ts": 1461507939642,
"status": 1
}
####
- /training/pre/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
{
"types": {
"1": "伏地挺身",
"2": "引体向上",
"3": "仰卧起坐",
"4": "胸部推举",
"5": "飞鸟",
"6": "肩部推举",
"7": "坐姿划船",
"8": "腿部外弯",
"9": "腿部内弯",
"10": "腿部推蹬",
"11": "腿部伸展",
"12": "三头肌训练",
"13": "二头肌训练"
},
"locations": {
"1": "室外/操场",
"2": "室内/健身房",
"3": "室内/自卑健身器材"
},
"drinkings": {
"1": "肌肉科技",
"2": "其他蛋白粉",
"3": "脱脂牛奶",
"4": "功能性饮料",
"5": "无"
},
"gears": {
"1": "NIKE",
"2": "McDavid",
"3": "Decathlon",
"4": "无"
},
"ts": 1461508158283,
"status": 1
}
####
- /training/start
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
training_id | long | 12311 | * | 运动任务ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /article/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
title | String | 12311 | * | 文章标题 |
content | long | 12311 | * | 文章内容 |
{
"ts": 1461508348477,
"status": 1
}
####
- /article/delete
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
article_id | long | 12311 | * | 文章ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /article/detail
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
article_id | long | 12311 | * | 文章ID |
{
"article": {
"articleID": 9,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "13580313279",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"title": "test9",
"content": "test9",
"createAt": 0,
"readCount": 5,
"likeCount": 0,
"dislikeCount": 0,
"commentCount": 0,
"comments": [
{
"articleCommentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"replyUser": null,
"content": "aaaaa",
"canDelete": 1
},
{
"articleCommentID": 4,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"replyUser": null,
"content": "aaaaa",
"canDelete": 1
},
{
"articleCommentID": 5,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"replyUser": null,
"content": "aaaaa",
"canDelete": 1
},
{
"articleCommentID": 6,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"replyUser": null,
"content": "aaaaa",
"canDelete": 1
}
],
},
"ts": 1461510521194,
"status": 1
}
canDelete 评论删除:1.能 2.不能 回到目录
####
- /article/list/recommed
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
start | String | 1313131 | * | 首页为0 |
count | int | 1 | * | 页面大小 |
{
"articles": [
{
"articleID": 35,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"title": "陈松铭TIT",
"content": "陈松铭CON",
"createAt": 0,
"readCount": 0,
"likeCount": 0,
"dislikeCount": 0,
"commentCount": 0,
"comments": [],
"canDelete": 1
},
{
"articleID": 30,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"title": "test1",
"content": "test",
"createAt": 0,
"readCount": 0,
"likeCount": 0,
"dislikeCount": 0,
"commentCount": 0,
"comments": [],
"canDelete": 1
}
],
"start": "",
"more": 1,
"ts": 1461510899096,
"status": 1
}
####
- /article/list/user
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
start | String | 1313131 | * | 首页为0 |
count | int | 1 | * | 页面大小 |
target_id | long | 10909090 | * | 目标userID |
{
"articles": [
{
"articleID": 35,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"title": "陈松铭TIT",
"content": "陈松铭CON",
"createAt": 0,
"readCount": 0,
"likeCount": 0,
"dislikeCount": 0,
"commentCount": 0,
"comments": [],
"canDelete": 1
},
{
"articleID": 30,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"title": "test1",
"content": "test",
"createAt": 0,
"readCount": 0,
"likeCount": 0,
"dislikeCount": 0,
"commentCount": 0,
"comments": [],
"canDelete": 1
}
],
"start": "",
"more": 1,
"ts": 1461510899096,
"status": 1
}
####
- /article/comment/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
article_id | long | 12311 | * | 文章ID |
reply_id | long | 12311 | 回复用户ID | |
content | String | aaaaa | * | 回复内容 |
{
"ts": 1461508348477,
"status": 1
}
####
- /article/comment/delete
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
comment_id | long | 12311 | * | 评论ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /article/like/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
article_id | long | 12311 | * | 文章ID |
type | int | 1 | * | 类型:1:赞 2:灭 |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
content | String | 12311 | * | 内容 |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/transfer
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
content | String | 12311 | * | 内容 |
transfer_id | long | 12311 | * | 转发ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/delete
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
moment_id | long | 12311 | * | 转发ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/detail
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
moment_id | long | 12311 | * | 转发ID |
{
"moment": {
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭LALALA",
"tranferMoment": null,
"createAt": 1461381901000,
"likeCount": 0,
"replyCount": 2,
"tranferCount": 0,
"likeUsers": [],
"replys": [
{
"replyID": 1,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAH",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393406000,
"canDelete": 1
},
{
"replyID": 2,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAHA",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393412000,
"canDelete": 1
}
],
"canDelete": 1
},
"ts": 1461516177274,
"status": 1
}
canDelete 能否删除 1:可以 2:不可以 回到目录
####
- /moment/list/user
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
start | long | 12311 | * | 首页为0 |
count | int | 20 | * | 页面大小 |
target_user_id | long | 12311 | * | 用户ID |
{
"moments": [
{
"momentID": 4,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭LALALA",
"tranferMoment": null,
"createAt": 1461393484000,
"likeCount": 1,
"replyCount": 0,
"tranferCount": 0,
"likeUsers": [],
"replys": [],
"canDelete": 1
},
{
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭LALALA",
"tranferMoment": null,
"createAt": 1461381901000,
"likeCount": 0,
"replyCount": 2,
"tranferCount": 0,
"likeUsers": [],
"replys": [
{
"replyID": 1,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAH",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393406000,
"canDelete": 1
},
{
"replyID": 2,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAHA",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393412000,
"canDelete": 1
}
],
"canDelete": 1
}
],
"start": "3",
"more": 0,
"ts": 1461516693126,
"status": 1
}
canDelete 能否删除 1:可以 2:不可以 回到目录
####
- /moment/list
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
start | long | 12311 | * | 首页为0 |
count | int | 20 | * | 页面大小 |
{
"moments": [
{
"momentID": 4,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭LALALA",
"tranferMoment": null,
"createAt": 1461393484000,
"likeCount": 1,
"replyCount": 0,
"tranferCount": 0,
"likeUsers": [],
"replys": [],
"canDelete": 1
},
{
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭LALALA",
"tranferMoment": null,
"createAt": 1461381901000,
"likeCount": 0,
"replyCount": 2,
"tranferCount": 0,
"likeUsers": [],
"replys": [
{
"replyID": 1,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAH",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393406000,
"canDelete": 1
},
{
"replyID": 2,
"momentID": 3,
"user": {
"userID": 10000000,
"username": "陈松铭LA",
"signNature": "helloworld",
"phone": "12345672278",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"text": "陈松铭HAHAHA",
"replyUser": {
"userID": 10000001,
"username": "",
"signNature": "该用户很懒,什么也没留下",
"phone": "12345672277",
"tags": [],
"location": "",
"occupation": "",
"avatar": "http://www.baidu.com/load?fileName=20160408163248q2bMAFpUK6hJYzgPT7ji.png",
"status": 0,
"rank": 0,
"score": 0
},
"createAt": 1461393412000,
"canDelete": 1
}
],
"canDelete": 1
}
],
"start": "3",
"more": 0,
"ts": 1461516693126,
"status": 1
}
canDelete 能否删除 1:可以 2:不可以 回到目录
####
- /moment/reply/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
moment_id | long | 12311 | * | 转发ID |
reply_user_id | long | 12311 | 回复用户ID | |
content | String | 12311 | * | 内容 |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/reply/delete
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
reply_id | long | 12311 | * | 回复ID |
{
"ts": 1461508348477,
"status": 1
}
####
- /moment/like/create
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
moment_id | long | 12311 | * | 转发ID |
type | int | 1 | * | 类型:1点赞 2取消 |
{
"ts": 1461508348477,
"status": 1
}
####
- /upload
- api_version = 1
- status = finished
参数 | 类型 | 例子 | 是否必须 | 描述 |
---|---|---|---|---|
key | String | 31319381038103018301830 | * | 用户key |
suffix | String | jpg | * | 类型 |
{
"url": "http://www.baidu.com/load?fileName=20160425011955s2PsOlD5rqEu1ApoIjl7.jpg",
"fileName": "20160425011955s2PsOlD5rqEu1ApoIjl7.jpg",
"ts": 1461518395453,
"status": 1
}
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21002 |
version | int(4) | 0 |
content | String | {"key": 30183128301} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 22002 |
version | int(4) | 0 |
content | String | {} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 23002 |
version | int(4) | 0 |
content | String | {} |
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21006 |
version | int(4) | 0 |
content | String | {} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 22006 |
version | int(4) | 0 |
content | String | {} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 23006 |
version | int(4) | 0 |
content | String | {} |
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21003 |
version | int(4) | 0 |
content | String | {} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 22003 |
version | int(4) | 0 |
content | String | {} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 23003 |
version | int(4) | 0 |
content | String | {} |
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21007 |
version | int(4) | 0 |
content | String | {"key":30183128301,"sid":12321,"rid":12314,"create_at":10213131,"text":"陈松铭LALLA"} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21008 |
version | int(4) | 0 |
content | String | {"key":30183128301,"sid":12321,"rid":12314,"create_at":10213131,"text":"陈松铭LALLA"} |
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21009 |
version | int(4) | 0 |
content | String | {"key":30183128301,"sid":12321,"rgid":12314,"create_at":10213131,"text":"陈松铭LALLA"} |
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21010 |
version | int(4) | 0 |
content | String | {"key":30183128301,"sid":12321,"rgid":12314,"create_at":10213131,"text":"陈松铭LALLA"} |
####
参数 | 类型 | 取值 |
---|---|---|
messageID | int(4) | 21005 |
version | int(4) | 0 |
content | String | {} |