異常說明
9999 系統(tǒng)錯誤
9901 字符串參數(shù)異常
9902 數(shù)字參數(shù)異常
9903 會員id不存在
其它編號為對應接口異常谅海,如0101為接口1 的異常
811 該條動態(tài)你已收藏敛劝,請勿重復收藏
1211 該條動態(tài)您已贊過徘跪,請不要貪心哦
2001 關注 和 被關注 id 不能相同
2101 記錄不存在
2201 手機和會員id不能同時為空
2202 該手機已注冊
2203 id 不存在
2301 標簽重復
2401 標簽不能為空或null
2402 要刪除的標簽不存在
2701 驗證碼不正確
2801, 驗證碼發(fā)送失敗
2901 手機號不存在
3401 type 值不合規(guī)范
3402 id 記錄不存在
1.公共信息接口
訪問路徑
http://jtest.babilama.com/companyInfo
參數(shù)
無
返回結果
說明:
defaultPortrait (默認頭像) baseUrl (基本域名)
{
"message": "ok",
"data": {
"baseUrl": "http://7xsqyg.com1.z0.glb.clouddn.com/",
"hotLabels": ["愛做輔食", "廚藝", "才藝", "健身達人", "搞笑", "時尚達人", "八卦", "美妝達人"],
"defaultPortrait": "http://www.baidu.com"
},
"code": 0
}
2.主頁廣告圖接口
訪問路徑
http://jtest.babilama.com/advertisement
參數(shù)
無
返回結果
{
"message": "ok",
"data": [
{
"id": 1,
"imgUrl": "http://7xsqyg.com2.z0.glb.qiniucdn.com/Fm7P8a7asuVbEMDCuzab-0sW09lN",
"url":"http://www.baidu.com"
},
{
"id": 2,
"imgUrl": "http://www.baidu.com",
"url":"http://www.baidu.com"
}
],
"code": 0
}
3.消息計數(shù)接口
訪問路徑
http://jtest.babilama.com/message/count
參數(shù)
memberId (發(fā)請求會員id 必填)
返回結果
說明: barbieRead (芭比消息已讀數(shù))汉柒, barbieUnread (芭比消息未讀數(shù))卦睹, commentRead (評論消息已讀數(shù))越妈, commentUnread (評論消息未讀數(shù))泪勒, praiseRead (贊消息已讀數(shù)), praiseUnread (贊消息未讀數(shù))棕兼, privateUnread (私信未讀)陡舅, privateRead (私信已讀) hasNew (是否有新消息)
{
"code": "0",
"data": {
"praiseUnread": 0,
"privateUnread": 0,
"commentUnread": 0,
"praiseRead": 0,
"barbieUnread": 0,
"commentRead": 0,
"barbieRead": 0,
"hasNew": false,
"privateRead": 1
},
"message": "ok"
}
4.芭比消息視圖接口
訪問路徑
http://jtest.babilama.com/message/barbie
參數(shù)
memberId (發(fā)請求會員id 必填),page(頁碼,默認1)伴挚,pageSize(一頁多少個 ,默認10)
返回結果
說明: title (消息標題) portrait (頭像) content (消息內容) imgs(圖片url) time (時間) url :(跳轉url)
{
"message": "ok",
"data": [
{
"title":"這是標題",
"portrait": "http://www.baidu.com/pic1.jpg",
"content": "這是一條消息",
"hasRead": true,
"imgs": "http://www.baidu.com/pic1.jpg",
"time": "剛剛",
"url":"http://jtest.babilama.com/resources/BarbieMessage/1"
}
],
"code": 1
}
5.評論消息視圖接口
訪問路徑
http://jtest.babilama.com/message/comment
參數(shù)
memberId (發(fā)請求會員id 必填),page(頁碼蹭沛,默認1)臂寝,pageSize(一頁多少個 ,默認10)
返回結果
說明: id (評論id), content (消息內容) nickname (昵稱) portrait (頭像) imgs(圖片url) time (時間) hasRead (是否已讀) dynamicId(動態(tài)id)
{
"message": "ok",
"data": [
{
"id":1,
"imgs": "http://www.baidu.com/pic1.jpg",
"content": "這是一條消息",
"hasRead": true,
"nickname": "芭比娃娃",
"portrait": "http://www.baidu.com/pic1.jpg",
"time": "剛剛",
"dynamicId":1
}
],
"code": 1
}
6.贊消息視圖接口
訪問路徑
http://jtest.babilama.com/message/praise
參數(shù)
memberId (發(fā)請求會員id 必填),page(頁碼,默認1)摊灭,pageSize(一頁多少個 ,默認10)
返回結果
說明: content (消息內容) nickname (昵稱) portrait (頭像) imgs(圖片url) time (時間) hasRead (是否已讀) dynamicId(動態(tài)id)
{
"message": "ok",
"data": [
{
"imgs": "http://www.baidu.com/pic1.jpg",
"content": "這是一條消息",
"hasRead": true,
"nickname": "芭比娃娃",
"portrait": "http://www.baidu.com/pic1.jpg",
"time": "剛剛",
"dynamicId":1
}
],
"code": 1
}
7.主頁動態(tài)展示接口
訪問路徑
http://jtest.babilama.com/dynamic/mainPage
參數(shù)
memberId : (會員id 登錄傳,不登錄不傳) page(頁碼败徊,默認1)帚呼,pageSize(一頁多少個 ,默認10)
返回結果
說明: memberId : (會員id), words (動態(tài)內容), dynamicId:(動態(tài)id), hasPraised (是否贊過) hasCollected (是否收藏) nickname (昵稱) portrait (頭像url) date (發(fā)表動態(tài)的時間) heat (熱度) pictureUrl (圖片地址) videoUrl (視頻地址) videoPictureUrl (視頻圖片地址) praiseCount ( 點贊數(shù)) commentCount (評論數(shù)) firstComment (第一條評論) firstCommentPortrait (第一條評論人頭像) firstCommentNickname (第一條評論人昵稱) firstCommentDateTime (第一條評論日期) firstCommentId (第一條評論id) firstCommentatorId (第一條評論人id)
{
"message": "ok",
"code": 0,
"data": [
{
"memberId" : 1,
"words": "拍的不錯!",
"dynamicId":1,
"hasPraised" : false,
"hasCollected":true
"commentCount": 99,
"date": "2016-04-13",
"firstComment": "很棒,再接再厲!",
"firstCommentId":1,
"第一條評論id":1,
"firstCommentDateTie": "2016-04-13 14:22",
"firstCommentNickname": "tooonly",
"firstCommentPortrait": "http://fawef.cdsafdsa.csdrf.qiuniucdn.com",
"heat": 8888,
"nickname": "圖靈能量",
"pictureUrl": "http://5432.fafa.fawf.qiniucdn.com",
"portrait": "http://324fsdfa.cofaf.zfewaf.qiniucdn.com",
"praiseCount": 88,
"videoPictureUrl": "http://faeswf.cdszf.cedsaf.qiuniucdn.com",
"videoUrl": "http://faewsfdaws.vaafew.qiuniucdn.video.com",
}
]
}
8.收藏一條動態(tài)接口
訪問路徑
http://jtest.babilama.com/dynamic/collect
參數(shù)
memberId (發(fā)請求會員id 必填)皱蹦, dynamicId (動態(tài)id 必填)
返回結果
說明: id (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}}
9.取消收藏一條動態(tài)接口
訪問路徑
http://jtest.babilama.com/dynamic/collect/cancel
參數(shù)
memberId (發(fā)請求會員id 必填)煤杀, dynamicId (動態(tài)id 必填)
返回結果
說明: id (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}}
10.評論接口
訪問路徑
http://jtest.babilama.com/dynamic/comment
參數(shù)
memberId (發(fā)請求會員id 必填), dynamicId (動態(tài)id 必填),content (評論內容 必填)
返回結果
說明: dynamicId (動態(tài)id), commentId (動態(tài)id),
{"message":"ok","code":0,"data":{"dynamicId":1,"commentId":1}
11.取消評論接口
訪問路徑
http://jtest.babilama.com/dynamic/comment/cancel
參數(shù)
commentId (評論id 必填)
返回結果
說明: dynamicId (動態(tài)id), commentId (動態(tài)id),
{"message":"ok","code":0,"data":{"dynamicId":1,"commentId":1}
12.點贊接口
訪問路徑
http://jtest.babilama.com/dynamic/praise
參數(shù)
memberId (發(fā)請求會員id 必填), dynamicId (動態(tài)id 必填)
返回結果
說明: id (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}
13.取消贊接口
訪問路徑
http://jtest.babilama.com/dynamic/praise/cancel
參數(shù)
memberId (發(fā)請求會員id 必填), dynamicId (動態(tài)id 必填)
返回結果
說明: id (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}}
14.刪除一條動態(tài)接口
訪問路徑
http://jtest.babilama.com/dynamic/delete
參數(shù)
dynamicId (動態(tài)id 必填)
返回結果
說明: id (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}}
15.個人動態(tài)展示接口
訪問路徑
http://jtest.babilama.com/dynamic/barbie
參數(shù)
fromId (發(fā)請求會員id 沪哺,登錄傳沈自,不登錄不傳), memberId(請求目標id 必填) page(頁碼,默認1)辜妓,pageSize(一頁多少個 ,默認10)
返回結果
說明: memberId : (會員id), dynamicId:(動態(tài)id), hasPraised (是否贊過) hasCollected (是否收藏過) nickname (昵稱) portrait (頭像url) date (發(fā)表動態(tài)的時間) heat (熱度) pictureUrl (圖片地址) videoUrl (視頻地址) videoPictureUrl (視頻圖片地址) praiseCount ( 點贊數(shù)) commentCount (評論數(shù)) firstComment (第一條評論) firstCommentPortrait (第一條評論人頭像) firstCommentNickname (第一條評論人昵稱) firstCommentDateTime (第一條評論日期) firstCommentId (第一條評論人id) words (動態(tài)內容)
{
"message": "ok",
"code": 0,
"data": [
{
"memberId" : 1,
"dynamicId":1,
"hasPraised":false,
"hasCollected":true,
"commentCount": 99,
"date": "2016-04-13",
"firstComment": "很棒枯途,再接再厲!",
"firstCommentId":1,
"firstCommentDateTie": "2016-04-13 14:22",
"firstCommentNickname": "tooonly",
"firstCommentPortrait": "http://fawef.cdsafdsa.csdrf.qiuniucdn.com",
"heat": 8888,
"nickname": "圖靈能量",
"pictureUrl": "http://5432.fafa.fawf.qiniucdn.com",
"portrait": "http://324fsdfa.cofaf.zfewaf.qiniucdn.com",
"praiseCount": 88,
"videoPictureUrl": "http://faeswf.cdszf.cedsaf.qiuniucdn.com",
"videoUrl": "http://faewsfdaws.vaafew.qiuniucdn.video.com",
"words": "拍的不錯!"
}
]
}
16.收藏動態(tài)展示接口
訪問路徑
http://jtest.babilama.com/dynamic/collect/list
參數(shù)
memberId (發(fā)請求會員id 必填),page(頁碼,默認1)籍滴,pageSize(一頁多少個 ,默認10)
返回結果
說明: dynamicId (動態(tài)id) words (動態(tài)內容) memberId (會員id) nickname (昵稱) portrait (頭像url) date (發(fā)表動態(tài)的時間) heat (熱度) pictureUrl (圖片地址) videoUrl (視頻地址) videoPictureUrl (視頻圖片地址) praiseCount ( 點贊數(shù)) commentCount (評論數(shù)) firstComment (第一條評論) firstCommentPortrait (第一條評論人頭像) firstCommentNickname (第一條評論人昵稱) firstCommentDateTime (第一條評論日期) firstCommentId (第一條評論人id)
{
"message": "ok",
"code": 0,
"data": [
{
"dynamicId":1,
"memberId":1,
"commentCount": 99,
"date": "2016-04-13",
"firstComment": "很棒酪夷,再接再厲!",
"firstCommentId":1,
"firstCommentDateTie": "2016-04-13 14:22",
"firstCommentNickname": "tooonly",
"firstCommentPortrait": "http://fawef.cdsafdsa.csdrf.qiuniucdn.com",
"heat": 8888,
"nickname": "圖靈能量",
"pictureUrl": "http://5432.fafa.fawf.qiniucdn.com",
"portrait": "http://324fsdfa.cofaf.zfewaf.qiniucdn.com",
"praiseCount": 88,
"videoPictureUrl": "http://faeswf.cdszf.cedsaf.qiuniucdn.com",
"videoUrl": "http://faewsfdaws.vaafew.qiuniucdn.video.com",
"words": "拍的不錯!"
}
]
}
17.發(fā)布動態(tài)接口
訪問路徑
http://jtest.babilama.com/dynamic/publish
參數(shù)
memberId (發(fā)請求會員id 必填), words (文字描述 必填), pictureUrl (圖片路徑,多張圖片以逗號隔開), videoUrl (視頻路徑) videoPictureUrl (視頻截圖路徑)
返回結果
說明: dynamicId (動態(tài)id)
{"message":"ok","code":0,"data":{"id":1}}
18.動態(tài)詳情接口
訪問路徑
http://jtest.babilama.com/dynamic/detail
參數(shù)
fromId(登錄傳孽惰,不登錄不傳)晚岭, dynamicId (動態(tài)id 必填)
返回結果
`說明:
hasPraised (是否贊過)
hasCollected (是否收藏過)
praiseList. id (贊id) ,
praiseList. memberId (點贊人id) 勋功,
praiseList. portrait (點贊人頭像)坦报,
createTime (動態(tài)創(chuàng)建時間),
heat (發(fā)動態(tài)人辣度)狂鞋,
pictureUrl (動態(tài)圖片內容)片择,
memberId (發(fā)動態(tài)人id),
nickname (發(fā)動態(tài)人昵稱)要销,
portrait (發(fā)動態(tài)人頭像) 构回,
praise (該評論點贊數(shù)),
videoPictureUrl (視頻縮略圖)疏咐,
videoUrl (視頻路徑)纤掸,
words (動態(tài)內容),
hasFocused (是否已經(jīng)關注)
{
"message": "ok",
"code": 0,
"data": {
"hasPraised":true,
"hasFocused":true,
"hasCollected":true,
"createTime": "2016-04-14",
"heat": 8888,
"pictureUrl": "http://faef.cszc.ewr.vdsa.fgaesf.qiniucdn.com.jpg",
"memberId": 3,
"nickname": "圖靈能量",
"portrait": "http://vds.cvdsz.fedsaf.qiniucdn.com.jpeg",
"praise": 88888,
"praiseList": [
{
"id":1,
"memberId": 5,
"portrait": "http://vdasf.czmx.fsae.img.qiniucdn.com.head0",
"nickname":"尼日利亞"
}
],
"videoPictureUrl": "http://vdssa.vcxvxniucdn.com.jpg",
"videoUrl": "http://cs/feawfdsafdsa.faef.fsdf.qiniucdn.com.video",
"words": "拍的不錯!"
}
}
19.一條動態(tài)的贊的列表接口
訪問路徑
http://jtest.babilama.com/dynamic/praise/list
參數(shù)
memberId : (會員id 登錄傳浑塞,不登錄不傳)借跪,dynamicId (動態(tài)id 必填),page(頁碼,默認1)酌壕,pageSize(一頁多少個 ,默認10)
返回結果
`說明:
portrait (頭像)掏愁,
memberId (id)歇由,
nickname (昵稱),
heat (熱度)果港,
hasFocused (是否已經(jīng)關注)
{
"message": "ok",
"data": [
{
"nickname": "奧哈有",
"memberId": 1,
"portrait": "http://www.baidu.com/hello",
"heat":888,
"hasFocused":true
}
],
"code": 1
}
20.關注接口
訪問路徑
http://jtest.babilama.com/barbie/focus
參數(shù)
memberId (發(fā)請求會員id 必填), targetId (被關注會員id 必填)
返回結果
{"message":"ok","code":0,"data":{"memberId":1,"targetId":2}}
21.取消關注接口
訪問路徑
http://jtest.babilama.com/barbie/focus/cancel
參數(shù)
memberId (發(fā)請求會員id 必填), targetId (被關注會員id 必填)
返回結果
{"message":"ok","code":0,"data":{"memberId":1,"targetId":2}}
22.編輯個人資料接口
訪問路徑
http://jtest.babilama.com/barbie/edit
參數(shù)
id (發(fā)請求會員id 必填) childAge (孩子年齡) nickname (昵稱), portrait (頭像url), backgroud (背景圖片URL), mobile (手機號) sex (性別(1 男沦泌,2 女)), city (所在城市), constellation (星座), labels (標簽), share (分享)
返回結果
{"message":"ok","code":0,"data":{"id":3}}
23.添加標簽接口
訪問路徑
http://jtest.babilama.com/barbie/addLabel
參數(shù)
memberId (發(fā)請求會員id 必填), label (標簽內容 必填)
返回結果
說明 : id (會員id)
{"message":"ok","code":0,"data":{"id":1}}
24.刪除標簽接口
訪問路徑
http://jtest.babilama.com/barbie/delLabel
參數(shù)
memberId (發(fā)請求會員id 必填), label (標簽內容 必填)
返回結果
說明 : id (會員id)
{"message":"ok","code":0,"data":{"id":1}}
25.周排行接口
訪問路徑
http://jtest.babilama.com/barbie/rank
參數(shù)
memberId (發(fā)請求會員id 必填)
返回結果
{
"code": 0,
"data": {
"rank": 1,
"countList": [
{
"周一": 0
},
{
"周二": 12
},
{
"周三": 9
},
{
"周四": 7
},
{
"周五": 0
},
{
"上周六": 0
},
{
"周日": 0
}
]
},
"message": "ok"
}
26.個人信息接口
訪問路徑
http://jtest.babilama.com/barbie/info
參數(shù)
memberId (請求信息會員id 必填) fromId(發(fā)請求會員id 可不填)
返回結果
id; hasFocused (是否已經(jīng)關注) createTime (創(chuàng)建時間) childAge (孩子年齡), nickname (昵稱), portrait ( 頭像url), heat (熱度), praise (被贊數(shù)), publish (發(fā)布數(shù)) fans ( 粉絲數(shù)), share (分享數(shù)), backgroud (背景圖片URL), mobile (手機號), sex (性別(1 男辛掠,2 女)), city (所在城市), constellation (星座), labels (標簽)
{
"message": "ok",
"code": 0,
"data": {
"hasFocused":true,
"backgroud": "http://fcadwsfcvaegf.fvavbv.fvaesgf.qiuniucdn.fad.jpg",
"city": "北京",
"constellation": "金牛座",
"createTime": "2016-04-13",
"fans": 88888,
"heat": 8888,
"id": 6,
"labels": "label",
"mobile": "15757180956",
"nickname": "圖靈能量",
"portrait": "http://fasf.vszdgda.fewagt23.qiniucdn.com",
"praise": 88,
"publish": 888,
"sex": 1,
"share": 8888888谢谦,
"childAge":0
}
}
27.登錄接口
訪問路徑
http://jtest.babilama.com/login
參數(shù)
phone (手機號 必填), code (短信驗證碼)
返回結果
{"message":"ok","data":{"id":1},"code":0}
28.請求短信驗證碼接口
訪問路徑
http://jtest.babilama.com/sms/sendCode
參數(shù)
mobile (手機號 必填)
返回結果
{"message":"ok","code":0,"data":""}
29.退出登錄接口
訪問路徑
http://jtest.babilama.com/logout
參數(shù)
memberId (發(fā)請求會員id 必填)
返回結果
{"message":"ok","data":{"id":1},"code":0}
30.獲取七牛授權接口
訪問路徑
http://jtest.babilama.com/qiniu/auth
參數(shù)
memberId (發(fā)請求會員id 必填)
返回結果
{
"message": "ok",
"data": {
"auth": "eHRwljLZmXXS8GQhYQ4bVFzmfQme5y3sM375Qjki:lJmftCPqNni1QNtaovSFcSRLvco=:eyJzY29wZSI6ImJhcmJpZSIsImRlYWRsaW5lIjoxNDYwNjE3NDM2fQ=="
},
"code": 1
}
31.設備號記錄接口
訪問路徑
http://jtest.babilama.com/barbie/device
參數(shù)
memberId (會員號 必填), deviceNo (設備編號), deviceType (設備類型 1 Android 萝衩,2iOS)
返回結果
{"message":"ok","data":"","code":0}
32.辣度榜動態(tài)展示接口
訪問路徑
http://jtest.babilama.com/dynamic/heatRank
參數(shù)
memberId (登錄傳回挽,不登錄不傳), page(頁碼,默認1)猩谊,pageSize(一頁多少個 ,默認10)
返回結果
說明: hasPraised (是否贊過) hasCollected (是否收藏過) nickname (昵稱) portrait (頭像url) date (發(fā)表動態(tài)的時間) heat (熱度) pictureUrl (圖片地址) videoUrl (視頻地址) videoPictureUrl (視頻圖片地址) praiseCount ( 點贊數(shù)) commentCount (評論數(shù)) firstComment (第一條評論) firstCommentPortrait (第一條評論人頭像) firstCommentNickname (第一條評論人昵稱) firstCommentDateTime (第一條評論日期) firstCommentId (第一條評論者id)
{
"message": "ok",
"code": 0,
"data": [
{
"hasPraised" : false,
"hasCollected":true,
"commentCount": 99,
"date": "2016-04-13",
"firstComment": "很棒千劈,再接再厲!",
"firstCommentId":1,
"firstCommentDateTie": "2016-04-13 14:22",
"firstCommentNickname": "tooonly",
"firstCommentPortrait": "http://fawef.cdsafdsa.csdrf.qiuniucdn.com",
"heat": 8888,
"nickname": "圖靈能量",
"pictureUrl": "http://5432.fafa.fawf.qiniucdn.com",
"portrait": "http://324fsdfa.cofaf.zfewaf.qiniucdn.com",
"praiseCount": 88,
"videoPictureUrl": "http://faeswf.cdszf.cedsaf.qiuniucdn.com",
"videoUrl": "http://faewsfdaws.vaafew.qiuniucdn.video.com"
}
]
}
33.一條動態(tài)的評論的列表接口
訪問路徑
http://jtest.babilama.com/dynamic/comment/list
參數(shù)
dynamicId (動態(tài)id 必填),page(頁碼,默認1)牌捷,pageSize(一頁多少個 ,默認10)
返回結果
`說明:
id (評論id)墙牌,
content (評論內容),
createTime (評論時間)宜鸯,
fromId (評論人id)憔古,
nickname (昵稱),
portrait (頭像)淋袖,
{
"message": "ok",
"data": [
{
"id":1,
"content": "天氣不錯鸿市,贊一個!",
"createTime": "2016-04-14",
"fromId": 10,
"nickname": "tooonly",
"portrait": "http://cvsda/cdsaf.zfcs.cdn.qiniu.com.head.jpg"
}
],
"code": 0
}
34.消息已讀接口
訪問路徑
http://jtest.babilama.com/message/read
參數(shù)
memberId (消息id 必填) type (消息類型 1評論 ,2贊 , 3私信 必填 )
返回結果
說明: id (消息id)
{
"message": "ok",
"data": null,
"code": 0
}
35.是否強制更新
訪問路徑
http://jtest.babilama.com/allow
參數(shù)
currVersion (當前客戶端版本必填) type (設備類型 1安卓 即碗,2ios 必填)
返回結果
說明: allow (是否強制更新)焰情, latest (最新版本)
{"code":"0","data":{"allow":"false","latest":1.1},"message":"ok"}
36.分享接口
訪問路徑
http://jtest.babilama.com/barbie/share
參數(shù)
id (發(fā)請求會員id必填) dynamicId (作品id)
返回結果
id 會員id
{"code":"0","data":{"id":1,"dynamicId":1},"message":"ok"}
37.私信視圖接口
訪問路徑
http://jtest.babilama.com/barbie/message/privaetMessaeList?memberId=43
參數(shù)
memberId (發(fā)請求會員id必填)
返回結果
``
{
"code": "0",
"data": [
{
"content": "1",
"createTime": {
"date": 17,
"day": 5,
"hours": 9,
"minutes": 50,
"month": 5,
"seconds": 17,
"time": 1466128217000,
"timezoneOffset": -480,
"year": 116
},
"fromId": 42,
"fromNickname": "阿強",
"fromPortrait": "FtS_biMx23OjaSpj-bI13uU50Y3C",
"hasRead": 0,
"id": 1,
"title": "1",
"toId": 43,
"toNickname": "道理我都懂",
"toPortrait": "Fh0s4j0VcK6tbndPLIU3W5r-sPR4"
}
],
"message": "ok"
}