|
|

楼主 |
发表于 2016-5-29 18:27:45
|
显示全部楼层
· 用户圈子
1) APP朋友圈
1.1) 获取APP朋友圈内容
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,getMomentList | | oid | int | N | 已加载的最新的一篇圈子时刻内容,为空则自动获取最后一次登录的时间点和刷新断点纪录做加载条件 | | bid | int | N | 上提加载下一页可选,无bid则传递oid,bid的定义为刷新加载时存在多页,返回一页内容会追加一个break id(bid)作为分页加载的起始ID | | next | int | N | 上提加载下一页时必需,传递值为1 | | own | int | N | 加载自己发布到朋友圈的内容时必须传递own,且值为1 |
获取APP朋友圈内容getMomentList返回参数data下字段说明:
| 名称 | 类型 | 说明 | | data | array | 数据 | | data : total | int | 本次获取新内容总条数 | | data : bid | int | 本次加载的断点ID,用于加载下一页 | | data : items | array | 本次加载的圈时刻内容数组(字典) | | data : items : id | int | 圈时刻ID | | data : itmes : description | string | 圈时刻文本内容 | | data : itmes : type | int | 圈时刻类型:1相册;2小视频;3连接 | | data : itmes : link | string | 类型为3的外链地址 | | data : itmes : account | string | 所属原始账号,需从好友列表里获取头像和昵称等 | | data : itmes : time | int | 发布时间戳 | | data : itmes : timestr | string | 发布时间格式,如3分钟前 | | data : itmes : located | string | 发布位置名称 | | data : itmes : attachments | array | 附件原地址,数组 | | data : itmes : attachthumbs | array | 附件缩略图,单张时长宽不固定,最长/宽不超过200 | | data : itmes : digg | int | 可视点赞数量,后台关闭时不显示 | | data : itmes : diggs | array | 点赞列表,后台关闭时不显示 | | data : itmes : comment | int | 可视评论数量,后台关闭时不显示 | | data : itmes : comments | array | 评论列表,后台关闭时不显示 | | data : itmes : diggs : total | int | 可视点赞数量 | | data : itmes : diggs : items | array | 可视点赞信息 | | data : itmes : diggs : items : id | int | 点赞ID | | data : itmes : diggs : items : digger | string | 点赞人原始账号,需从好友列表里获取头像和昵称信息 | | data : itmes : diggs : time | int | 点赞时间戳 | | data : itmes : comments : total | int | 可视评论数量 | | data : itmes : comments : items | array | 可视评论信息 | | data : itmes : comments : items : id | int | 评论ID | | data : itmes : comments : items : commenter | string | 评论人原始账号,需从好友列表里获取头像和昵称信息 | | data : itmes : comments : items : atwho | int | 评论回复谁的原始账号,需从好友列表里获取头像和昵称信息 | | data : itmes : comments : items : content | string | 评论内容 | | data : itmes : comments : items : time | int | 评论时间戳 |
JSON返回示例:
- {
- "code": 200,
- "data": {
- "bid": 12345,
- "total": 2,
- "items": [
- {
- "id": 12346,
- "description": "原来CC的同时还进行了SYN攻击……",
- "type": 1,
- "attachments": [
- "http://www.pmsdev.com/data/plugins/modules/moment/12345678910111214.jpg",
- "http://www.pmsdev.com/data/plugins/modules/moment/12345678910111215.jpg"
- ],
- "attachthumbs": [
- "http://www.pmsdev.com/data/plugins/modules/moment/thumb/12345678910111214.jpg",
- "http://www.pmsdev.com/data/plugins/modules/moment/thumb/12345678910111215.jpg"
- ],
- "diggs": {
- "total": 0,
- "items": []
- },
- "digg": 0,
- "comments": {
- "total": 0,
- "items": []
- },
- "comment": 0,
- "link": "",
- "account": "arsio",
- "time": "1468132042",
- "timestr": "2小时前",
- "located": "莆田·蔚图"
- },
- {
- "id": 12345,
- "description": "服务器被人CC攻击真心不爽",
- "type": 1,
- "attachments": [
- "http://www.pmsdev.com/data/plugins/modules/moment/12345678910111213.jpg"
- ],
- "attachthumbs": [
- "http://www.pmsdev.com/data/plugins/modules/moment/thumb/s_12345678910111213.jpg"
- ],
- "diggs": {
- "total": 2,
- "items": [
- {
- "id": 1,
- "digger": "vtoo",
- "time": "1789999999"
- },
- {
- "id": 2,
- "digger": "youki",
- "time": "1790000000"
- }
- ]
- },
- "digg": 2,
- "comments": {
- "total": 3,
- "items": [
- {
- "id": 1,
- "commenter": "vtoo",
- "atwho": "",
- "content": "别发牢骚了,抓紧解决!",
- "time": "1468143042"
- },
- {
- "id": 2,
- "commenter": "arsio",
- "atwho": "vtoo",
- "content": "CC解决了,正在解决SYN",
- "time": "1468147042"
- },
- {
- "id": 3,
- "commenter": "youki",
- "atwho": "",
- "content": "解决了就好~",
- "time": "1468151042"
- }
- ]
- },
- "comment": 2,
- "link": "",
- "account": "arsio",
- "time": "1468131042",
- "timestr": "2小时前",
- "located": "莆田·荔园小区"
- }
- ]
- },
- "msg": "success"
- }
复制代码
1.2) 获取圈时刻详情
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,获取内容getMomentDetail | | mid | int | Y | 圈时刻ID |
获取列表getMomentDetail返回参数说明:
| 名称 | 类型 | 说明 | | items | array | 数据 | | items : id | int | 视频ID | | items : description | string | 描述 | | items : type | int | 类型:1相册;2短视频;3链接 | | items : attachments | array | 附件原地址 | | items : attachthumbs | array | 附件缩略图,短视频无缩略图,单图时尺寸不是1:1 | | items : diggs | array | 可见的点赞数据集 | | items : diggs : total | int | 可见的点赞数据数 | | items : diggs : items | array | 可见的点赞数据 | | items : diggs : items : id | int | 点赞ID | | items : diggs : items : digger | string | 点赞人原始账号 | | items : diggs : items : time | string | 点赞时间戳 | | items : digg | int | 可见的点赞数据数 | | items : comments | array | 可见的点赞数据集 | | items : comments : total | array | 可见评论数 | | items : comments : items | array | 可见的评论数据 | | items : comments : items : id | int | 评论ID | | items : comments : items : commenter | string | 评论人原始账号 | | items : comments : items : atwho | string | @回复谁 | | items : comments : items : content | string | 评论内容 | | items : comments : items : time | string | 评论时间戳 | | items : comment | int | 可见评论数 | | items : link | string | 外链链接,待定 | | items : account | string | 发布人原始账号 | | items : time | string | 发布时间时间戳 | | items : timestr | string | 发布时间时间格式串 | | items : adid | string | 广告ID | | items : adidext | string | 替代广告ID | | items : located | string | 自定义或自动获取位置名称 |
JSON返回示例:
- {
- "data": {
- "items": {
- "id": 12345,
- "description": "服务器被人CC攻击真心不爽",
- "type": 1,
- "attachments": [
- "http://www.pmsdev.com/data/plugins/modules/moment/12345678910111213.jpg"
- ],
- "attachthumbs": [
- "http://www.pmsdev.com/data/plugins/modules/moment/thumb/12345678910111213.jpg"
- ],
- "diggs": {
- "total": 2,
- "items": [
- {
- "id": 1,
- "digger": "vtoo",
- "time": "1789999999"
- },
- {
- "id": 2,
- "digger": "youki",
- "time": "1790000000"
- }
- ]
- },
- "digg": 2,
- "comments": {
- "total": 3,
- "items": [
- {
- "id": 1,
- "commenter": "vtoo",
- "atwho": "",
- "content": "别发牢骚了,抓紧解决!",
- "time": "1468143042"
- },
- {
- "id": 2,
- "commenter": "arsio",
- "atwho": "vtoo",
- "content": "CC解决了,正在解决SYN",
- "time": "1468147042"
- },
- {
- "id": 3,
- "commenter": "youki",
- "atwho": "",
- "content": "解决了就好~",
- "time": "1468151042"
- }
- ]
- },
- "comment": 2,
- "link": "http://www.pmsdev.com/moment.php?mid=12345",
- "account": "arsio",
- "time": "1468131042",
- "timestr": "4小时前",
- "adid": "",
- "adidext": "",
- "located": "莆田·荔园小区"
- }
- },
- "code": 200,
- "msg": "success"
- }
复制代码
1.3) 发布APP朋友圈内容
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,writeMoment | | type | int | Y | 内容类型 | | description | string | N | 圈时刻内容,不能与附件或链接同时为空 | | photo | array | N | 类型为1相册的附件 | | video | string | Y|N | 类型为2短视频时的附件 | | link | string | Y|N | 圈时刻内容ID | | statu | int | N | 圈时刻内容隐私设置:0公开;1私密;2部分可见;3不给谁看 | | filter | array | Y|N | 隐私设置为部分可见时必填,好友原始账号 | | shield | array | Y|N | 隐私设置为不给谁看时必填,好友原始账号 | | remind | array | N | 提醒谁看,好友原始账号 | | latitude | int | Y | 位置坐标经度 | | longitude | int | Y | 位置坐标维度 | | precision | int | Y | 位置坐标精度 | | located | string | N | 位置备注 |
发布APP朋友圈内容writeMoment返回参数data下字段说明:
| 名称 | 类型 | 说明 | | code | int | 返回码 | | msg | string | 返回码对应信息 |
JSON返回示例:
- {
- "code": 200,
- "msg": "success"
- }
复制代码
2) 圈时刻点赞相关
2.1) 获取APP朋友圈内容的点赞信息,用于对缓存圈时刻信息更新点赞信息
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,getMomentDigg | | mid | int | Y | 圈时刻内容ID | | odid | int | N | 当前内容的旧的最新点赞ID |
获取APP朋友圈内容的点赞信息getMomentDigg返回参数data下字段说明:
| 名称 | 类型 | 说明 | | data | array | 数据 | | data : total | int | 本次获取新内容总条数 | | data : items | array | 本次加载的圈时刻内容数组(字典) | | data : itmes : id | int | 点赞ID | | data : itmes : digger | string | 点赞人原始账号,需从好友列表里获取头像和昵称信息 | | data : itmes : time | int | 点赞时间戳 |
JSON返回示例:
- {
- "code": 200,
- "data": {
- "total": 2,
- "items": [
- {
- "id": 1,
- "digger": "vtoo",
- "time": "1789999999"
- },
- {
- "id": 2,
- "digger": "youki",
- "time": "1790000000"
- }
- ]
- },
- "msg": "success"
- }
复制代码
2.2) 为APP朋友圈内容点赞
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,diggMoment | | mid | int | Y | 圈时刻内容ID |
为APP朋友圈内容点赞diggMoment返回参数data下字段说明:
| 名称 | 类型 | 说明 | | code | int | 返回码 | | msg | string | 返回码对应信息 |
JSON返回示例:
- {
- "code": 200,
- "msg": "success"
- }
复制代码
3) 圈时刻评论相关
3.1) 获取APP朋友圈内容的评论信息,用于对缓存圈时刻信息更新评论信息
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,getMomentComment | | mid | int | Y | 圈时刻内容ID | | ocid | int | N | 当前内容的旧的最新评论ID |
获取APP朋友圈内容的点赞信息getMomentComment返回参数data下字段说明:
| 名称 | 类型 | 说明 | | data | array | 数据 | | data : total | int | 本次获取新内容总条数 | | data : items | array | 本次加载的圈时刻内容数组(字典) | | data : items : id | int | 评论ID | | data : items : commenter | string | 评论人原始账号 | | data : items : atwho | string | @回复谁 | | data : items : content | string | 评论内容 | | data : items : time | string | 评论时间戳 |
JSON返回示例:
- {
- "code": 200,
- "data": {
- "total": 2,
- "items": [
- {
- "id": 2,
- "commenter": "arsio",
- "atwho": "vtoo",
- "content": "CC解决了,正在解决SYN",
- "time": "1468147042"
- },
- {
- "id": 3,
- "commenter": "youki",
- "atwho": "",
- "content": "解决了就好~",
- "time": "1468151042"
- }
- ]
- },
- "msg": "success"
- }
复制代码
3.2) 评论APP朋友圈内容
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,commentMoment | | mid | int | Y | 圈时刻内容ID | | reply | string | Y | 回复谁的评论,即@谁 | | content | string | Y | 评论内容 |
为APP朋友圈内容点赞diggMoment返回参数data下字段说明:
| 名称 | 类型 | 说明 | | code | int | 返回码 | | msg | string | 返回码对应信息 |
JSON返回示例:
- {
- "code": 200,
- "msg": "success"
- }
复制代码
4) 圈子设置项
3.1) 获取APP朋友圈设置
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,getMomentSetting |
获取APP朋友圈设置getMomentSetting返回参数data下字段说明:
| 名称 | 类型 | 说明 | | data | array | 数据 | | data : user_account | string | 设置所有人原始账号 | | data : setting_background | string | 圈封面图片 | | data : setting_sign | string | 圈签名 | | data : setting_new | int | 更新提醒 | | data : setting_tags | array | 标签 | | data : setting_filter | array | 不看TA的 | | data : setting_shield | array | 不给TA看 | | data : setting_stranger | int | 给陌生人查看 | | data : setting_id | int | 设置的ID |
JSON返回示例:
- {
- "data": {
- "user_account": "arsio",
- "setting_background": "",
- "setting_sign": "",
- "setting_new": 1,
- "setting_tags": [],
- "setting_filter": [],
- "setting_shield": [],
- "setting_stranger": 1,
- "setting_id": 0
- },
- "code": 200,
- "msg": "success"
- }
复制代码
3.2) 配置APP朋友圈设置
请求参数说明:
| 名称 | 类型 | 必填 | 说明 | | key | string | Y | APP生成并记录到服务器的唯一的key值 | | m | string | Y | 模块名称,圈子模块为moment | | act | string | Y | 函数名,momentSetting | | type | string | Y | 配置字段类型:bg、sign、new、stranger、tags、filter、shield | | bg | string | Y|N | 背景封面图,类型为bg时必传,其他值不传 | | sign | string | Y|N | 签名,文字长度不超30个字,类型为sign时必传,其他值不传 | | new | int | Y|N | 是否更新提醒,类型为new时必传,其他值不传 | | stranger | int | Y|N | 陌生人是否可预览,类型为stranger时必传,其他值不传 | | tags | array | Y|N | 标签,类型为tags时必传,其他值不传 | | filter | array | Y|N | 不看TA的,类型为filter时必传,其他值不传 | | shield | array | Y|N | 不让TA看,类型为shield时必传,其他值不传 |
配置APP朋友圈设置momentSetting返回参数data下字段说明:
| 名称 | 类型 | 说明 | | code | int | 返回码 | | msg | string | 返回码对应信息 | | data | string | 类型为bg时才会返回该项图片WEB端地址 |
JSON返回示例:
- {
- "code": 200,
- "msg": "success"
- }
复制代码
|
|