新潮教室签到
1. 获取当前用户亲密度,排名
method=app.starClass.rankInfo
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.rankInfo |
|
|
uid |
int |
否 |
213 |
0 |
用户id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": {
// 如果没有签过到,会显示零
"userNum": 10,
// 如果没有签过到,会没有数据
"userRank": 2
},
"md5": "fcf7791bac08abb80ef3a2b27964386c",
"message": "获取用户亲密度成功"
}
错误码
错误码 code |
message |
说明 |
200 |
success |
|
400 |
输入参数错误 |
没传 uid |
500 |
获取个人排名失败 |
uid 不存在或者查询 redis 失败 |
2.签到
method=app.starClass.sign
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.sign |
|
|
uid |
int |
否 |
213 |
0 |
用户id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": {
// 本次增加的亲密度
"addNum": 10,
// 签到记录
"logs": [
{
"addNum": 10,
"createTime": 1460112775,
"id": 211,
"starId": 1,
"type": 1,
"uid": 3703860
}
],
// 前三名
"rankList": [
{
"num": 10,
"uid": 3566199,
"username": "136****8114@yohoinc.com"
},
{
"avatar": "http://static.yoho.cn/images/default_userhead_boy_180_180.png?imageView/{mode}/w/{width}/h/{height}",
"num": 10,
"uid": 3566423,
"username": "黄德才"
},
{
"avatar": "http://static.yoho.cn/images/default_userhead_boy_180_180.png?imageView/{mode}/w/{width}/h/{height}",
"num": 10,
"uid": 3703860,
"username": "曹苒"
}
]
},
"md5": "450edbd92076dfac74701cb6421f68ae",
"message": "获取用户签到信息成功"
}
错误码
错误码 code |
message |
说明 |
200 |
success |
|
400 |
输入参数错误 |
没传 uid |
500 |
设置 redis 失败 |
比如 redis 挂了等情况 |
3.转发
method=app.starClass.forward
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.forward |
|
|
uid |
int |
否 |
213 |
0 |
用户id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": 10, // 本次增加的分数
"md5": "9f6ed5823862ae9009fc8084516132da",
"message": "用户转发"
}
错误码
错误码 code |
message |
说明 |
200 |
success |
|
400 |
输入参数错误 |
没传 uid |
500 |
设置 redis 失败 |
比如 redis 挂了等情况 |
前 100
method=app.starClass.top100
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.top100 |
|
|
uid |
int |
是 |
213 |
0 |
用户id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"top": [
{
"avatar": "http://static.yoho.cn/images/default_userhead_boy_180_180.png?imageView/{mode}/w/{width}/h/{height}",
"num": 20,
"uid": 3703860,
"username": "曹苒"
},
{
"avatar": "",
"num": 10,
"uid": 3566199,
"username": "136****8114@yohoinc.com"
},
{
"avatar": "http://static.yoho.cn/images/default_userhead_boy_180_180.png?imageView/{mode}/w/{width}/h/{height}",
"num": 10,
"uid": 3566423,
"username": "黄德才"
},
{
"avatar": "",
"num": 10,
"uid": 967016,
"username": "goodboy"
},
{
"avatar": "",
"num": 10,
"uid": 8041520,
"username": "朱少卿"
}
],
"userStarInfo": {
"userNum": 10,
"userRank": 5,
"username": "朱少卿"
}
},
"md5": "7085123ec3516d4d9ce60c6001407596",
"message": "top100"
}
错误码
错误码 code |
message |
说明 |
200 |
success |
|
500 |
查询 redis 失败 |
比如 redis 挂了等情况 |
4.获得星潮教室中星搭配的文章
星搭配文章取逛后台新增的标签分类‘星潮教室’,标签开启状态下的文章(/guang/api/*/article/getStarClassroomArticleList)(app接口)
接口说明 |
接口说明 |
请求域名 |
http://api.yoho.cn/ |
接口名 |
/guang/api/*/article/getStarClassroomArticleList |
接口说明 |
获得星潮教室中星搭配的文章 |
接口说明 |
get |
请求参数
参数名称 |
参数类型 |
长度 |
是否必须 |
示例值 |
默认值 |
描述 |
page |
Integer |
3 |
否 |
1 |
1 |
页码 |
正常返回结果
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"datetime": "1460342224",
"list": {
"artList": [
{
"ads_img_size": "",
"article_type": "1",
"author": {
"author_id": "5105041",
"avatar": "http://img12.static.yhbimg.com/yhb-img02/2015/06/15/14/02e77877049e6949eb5e8b121b6f58204d.jpg?imageView/0/w/100/h/100",
"name": "雷恩雷恩",
"url": "http://guang.m.yohobuy.com/author/index?id=5105041&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"id\":\"5105041\"},\"share\":\"\",\"id\":5105041,\"type\":0,\"islogin\":\"N\",\"url\":\"http://guang.m.yohobuy.com/author/index\"}}"
},
"author_id": "5105041",
"category_id": "1",
"category_name": "话题",
"conver_image_type": "2",
"id": 29630,
"intro": "Wuli凡凡前天回广州老家,小蛮腰可是为他亮起了欢迎语~这阵仗,简直了。看来《老炮儿》和wuli凡凡的人气,实在是高的不要不要。~",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "0",
"praiseStatus": "true",
"praise_num": "46",
"publish_time": "12月25日 22:00",
"share": {
"url": "http://guang.m.yohobuy.com/info/index?id=29630&openby:yohobuy={\"action\":\"go.share\",\"params\":{\"pic\":\"http://img11.static.yhbimg.com/yhb-img01/2015/12/25/10/014df3a77aad110a75f4c63865461785da.jpg?imageView/2/w/640/h/640\",\"title\":\"《老炮儿》造型大吐槽!吴亦凡李易峰戏里戏外造型PK!\",\"url\":\"http://guang.m.yohobuy.com/info/index?id=29630\",\"content\":\"潮流资讯,新鲜贩售,YOHO!有货【逛】不停\"}}"
},
"src": "http://img11.static.yhbimg.com/yhb-img01/2015/12/25/10/014df3a77aad110a75f4c63865461785da.jpg?imageView/{mode}/w/{width}/h/{height}",
"title": "《老炮儿》造型大吐槽!吴亦凡李易峰戏里戏外造型PK!",
"url": "http://guang.m.yohobuy.com/info/index?id=29630&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"id\":\"29630\"},\"update_flag\":\"a585b3d889ca39701f76149e194ae268\",\"shareparam\":{\"id\":29630},\"share\":\"/guang/api/v1/share/guang\",\"id\":29630,\"type\":1,\"url\":\"http://guang.m.yohobuy.com/info/index\",\"islogin\":\"N\"}}",
"views_num": "57133"
},
{
"article_type": "1",
"author": {
"author_id": "5514979",
"avatar": "http://img12.static.yhbimg.com/yhb-img02/2015/06/12/15/025ff50f6d72fd19abe00c1bc3f0576eaa.jpg?imageView/0/w/100/h/100",
"name": "XpecialSux",
"url": "http://guang.m.yohobuy.com/author/index?id=5514979&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"id\":\"5514979\"},\"share\":\"\",\"id\":5514979,\"type\":0,\"islogin\":\"N\",\"url\":\"http://guang.m.yohobuy.com/author/index\"}}"
},
"author_id": "5514979",
"category_id": "2",
"category_name": "搭配",
"conver_image_type": "1",
"id": 589,
"intro": "印象里松糕鞋总是女生的专属,殊不知,男生穿上松糕鞋同样也可以萌萌哒,简单的白色短袖T恤搭配迷彩短裤,原创的松糕鞋编织鞋头细节承载麂皮绒的特殊质感,表达年轻人拒绝平庸主义的态度。",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "0",
"praiseStatus": "true",
"praise_num": "25",
"publish_time": "06月05日 16:10",
"share": {
"url": "http://guang.m.yohobuy.com/info/index?id=589&openby:yohobuy={\"action\":\"go.share\",\"params\":{\"pic\":\"http://img11.static.yhbimg.com/yhb-img01/2015/06/01/13/01c00f0fe35939d71161f98f4996dbe703.jpg?imageView/2/w/640/h/640\",\"title\":\"男生穿松糕鞋也可以萌萌哒\",\"url\":\"http://guang.m.yohobuy.com/info/index?id=589\",\"content\":\"潮流资讯,新鲜贩售,YOHO!有货【逛】不停\"}}"
},
"src": "http://img11.static.yhbimg.com/yhb-img01/2015/06/01/13/01c00f0fe35939d71161f98f4996dbe703.jpg?imageView/{mode}/w/{width}/h/{height}",
"title": "男生穿松糕鞋也可以萌萌哒",
"url": "http://guang.m.yohobuy.com/info/index?id=589&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"id\":\"589\"},\"update_flag\":\"5b9724501839dfbe5ffcc00201868dc0\",\"shareparam\":{\"id\":589},\"share\":\"/guang/api/v1/share/guang\",\"id\":589,\"type\":1,\"url\":\"http://guang.m.yohobuy.com/info/index\",\"islogin\":\"N\"}}",
"views_num": "25960"
}
]
},
"page": 1,
"total": 2,
"totalPage": 1
},
"md5": "6b2878c28018dbae9435cdc49a019e3e",
"message": "星潮教室文章列表"
}
响应内容描述
Param Name |
Param Type |
Desc |
alg |
String |
|
code |
int |
状态码 |
md5 |
String |
|
message |
String |
返回结果内容描述 |
data |
json |
返回数据内容 |
datetime |
String |
当前时间 |
page |
int |
当前页 |
total |
int |
总记录数 |
totalPage |
int |
总页数 |
list |
json |
文章集合对象 |
artList |
array |
文章数组 |
ads_img_size |
String |
广告图片尺寸 |
article_type |
String |
文章类型 |
author_id |
String |
作者ID |
author |
json |
作者对象json |
author_id |
String |
作者ID |
avatar |
String |
产品的图片URL |
name |
String |
名称 |
url |
String |
链接的地址 |
category_id |
String |
分类ID |
category_name |
String |
分类名称 |
conver_image_type |
String |
图片类型 1方图,2长图 |
id |
String |
|
intro |
String |
文章信息 |
isFavor |
String |
是否收藏 |
isPraise |
String |
是否点赞 |
is_recommended |
String |
是否推荐 |
praiseStatus |
String |
点赞状态 |
praise_num |
String |
点赞数量 |
publish_time |
String |
发布时间 |
share |
json |
分享链接 |
url |
String |
分享链接地址 |
src |
String |
图片绝对路径 |
title |
String |
文章标题 |
url |
String |
URL |
views_num |
String |
查看数量 |
异常返回结果:
错误码code |
错误message |
说明 |
500 |
|
内部错误 |
5. 新潮教室新首页
请求示例
http://devapi.yoho.cn:58078/?method=app.starClass.index&client_type=h5&code=8adc27fcf5676f356602889afcfd2a8e&debug=XYZ
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.index |
|
|
client_type |
string |
否 |
h5 |
|
客户端类型 |
code |
string |
是 |
8adc27fcf5676f356602889afcfd2a8e |
8adc27fcf5676f356602889afcfd2a8e |
资源位码 |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": {
// 焦点图资源位码
"ads": {
"data": [
{
"bgColor": "",
"src": "http://img10.static.yhbimg.com/yhb-img01/2016/05/26/10/01a2e1f0e92598128e07721cdcdf9f388e.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "123"
},
{
"bgColor": "",
"src": "http://img10.static.yhbimg.com/yhb-img01/2016/05/26/10/015b86553a6535a1913c407f95a3d24b96.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://www.baidu.com"
}
],
"focus_type": "1",
"template_id": "10036",
"template_intro": "焦点图",
"template_name": "focus"
},
// 文章列表
"list": [
{
"article_type": "1",
"author_id": "3997053",
"category_id": "3",
"conver_image_type": "1",
"ext": {
"tags": [
{
"classifyId": 2,
"cover": "",
"createTime": 1432118996,
"id": 55,
"isHot": 1,
"status": 1,
"tagName": "吴亦凡"
},
{
"classifyId": 2,
"cover": "",
"createTime": 1432118997,
"id": 57,
"isHot": 0,
"status": 1,
"tagName": "王俊凯"
}
]
},
"id": 34258,
// 文章简介
"intro": "test",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "1",
"praiseStatus": "true",
"praise_num": "2",
"publish_time": "1464854218",
// 文章封面名称
"src": "http://img12.static.yhbimg.com/article/2016/06/02/15/02661b0a7967d097c10640aa18029cb57c.png?imageView/{mode}/w/{width}/h/{height}",
"tag": "复古,森女,吴亦凡,王俊凯",
// 文章标题
"title": "SYJ-test",
"url": "https://guang.m.yohobuy.com/info/index?id=34258",
"views_num": "116"
}
],
// 标签列表
"tags": [
{
"classifyId": 2,
"cover": "", // 标签封面
"createTime": 1432118996,
"id": 55,
"isHot": 1,
"status": 1,
"tagName": "吴亦凡" // 标签名称
},
{
"classifyId": 2,
"cover": "",
"createTime": 1432118997,
"id": 57,
"isHot": 0,
"status": 1,
"tagName": "王俊凯"
}
]
},
"md5": "ed8e1e65e98b9d5e614e407951108486",
"message": "success"
}
6. 新潮教室明星专区
请求示例
http://devapi.yoho.cn:58078/?method=app.starClass.lastTagArticle&client_type=h5&page=2&tag=吴亦凡&debug=XYZ
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.starClass.lastTagArticle |
|
|
client_type |
string |
否 |
h5 |
|
客户端类型 |
tag |
string |
否 |
吴亦凡 |
|
明星标签 |
page |
int |
是 |
1 |
1 |
页码 |
size |
int |
是 |
10 |
10 |
每页大小 |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"list": [
{
"article_type": "1",
"author_id": "3997053",
"category_id": "3",
"conver_image_type": "1",
// 收藏数量
"favor_num": "1",
"id": 34258,
// 简介
"intro": "test",
// 是否收藏
"isFavor": "N",
"isPraise": "N",
"is_recommended": "1",
"praiseStatus": "true",
"praise_num": "2",
// 发表时间
"publish_time": "1464854218",
// 分享
"share": {
"url": "https://guang.m.yohobuy.com/info/index?id=34258"
},
// 封面
"src": "http://img12.static.yhbimg.com/article/2016/06/02/15/02661b0a7967d097c10640aa18029cb57c.png?imageView/{mode}/w/{width}/h/{height}",
"tag": "复古,森女,吴亦凡,王俊凯",
// 标题
"title": "SYJ-test",
// 链接
"url": "https://guang.m.yohobuy.com/info/index?id=34258",
// 查看次数
"views_num": "116"
},
{
"ads_img_size": "1088680",
"article_type": "1",
"author_id": "589238",
"category_id": "19",
"conver_image_type": "2",
"favor_num": "5",
"id": 34230,
"intro": "yun_文章,带有预发布时间测试,文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要。",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "1",
"praiseStatus": "true",
"praise_num": "3",
"publish_time": "1464256800",
"share": {
"url": "https://guang.m.yohobuy.com/info/index?id=34230"
},
"src": "http://img11.static.yhbimg.com/article/2016/05/17/13/010e112d050341b1927465ce6592265218.png?imageView/{mode}/w/{width}/h/{height}",
"tag": "吴亦凡",
"title": "yun_文章,带有预发布时间测试",
"url": "https://m.yohobuy.com/brands",
"views_num": "6"
},
{
"ads_img_size": "1088680",
"article_type": "1",
"author_id": "521285",
"category_id": "2",
"conver_image_type": "1",
"favor_num": "23",
"id": 3,
"intro": "依稀记得上初中那会,谁要有一件胸口带“钩子”的衣服,那他/她走路一定昂首挺胸,生怕别人看不见一样!",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "0",
"praiseStatus": "true",
"praise_num": "28",
"publish_time": "1459267200",
"share": {
"url": "https://guang.m.yohobuy.com/info/index?id=3"
},
"src": "http://img10.static.yhbimg.com/yhb-img01/2015/05/20/20/017f40fe5be35c9e1412cd8e2164c87e83.jpg?imageView/{mode}/w/{width}/h/{height}",
"tag": "吴亦凡,王俊凯",
"title": "会动的的免费广告!",
"url": "asdasdas",
"views_num": "39859"
}
],
"pageNo": 1,
"pageSize": 10,
"totalCount": 3,
"totalPage": 1
},
"md5": "824db9354f3da88c6c00a864915eb7cd",
"message": "success"
}
7. 带返回参数的收藏
请求示例
http://devapi.yoho.cn:58078/?method=app.sns.setFavorBackCount&client_type=h5&debug=XYZ&article_id=34258&uid=11
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.sns.setFavorBackCount |
|
|
client_type |
string |
否 |
h5 |
|
客户端类型 |
article_id |
int |
否 |
1 |
1 |
文章 id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": "2", // 该文章目前有多少收藏
"md5": "9e428b0fe50fdb4e5e2ce070b621ed01",
"message": "操作成功"
}
8. 带返回参数的取消收藏
请求示例
http://devapi.yoho.cn:58078/?method=app.sns.cancelFavorBackCount&client_type=h5&debug=XYZ&article_id=34258&uid=11
入参
参数名称 |
参数类型 |
可否为空 |
示例 |
默认值 |
备注 |
method |
string |
否 |
app.sns.cancelFavorBackCount |
|
|
client_type |
string |
否 |
h5 |
|
客户端类型 |
article_id |
int |
否 |
1 |
1 |
文章 id |
出参
{
"alg": "SALT_MD5",
"code": 200,
"data": "1",
"md5": "c13a1ace2c5883be18643551bd17ebcd",
"message": "操作成功"
}
其他相关文档
资讯收藏
资讯取消收藏