-
Notifications
You must be signed in to change notification settings - Fork 0
Home
mr.杨 edited this page Apr 18, 2015
·
15 revisions
##接口文档V0.1
####创建测评接口
- URL :
http://api.yosneaker.com/store/articles - Method : POST
#####参数
{
"articleTitle": "标题",
"articleDescription": "简介",
"articleComment": "评论",
"articleLevel": 5,
"articleImages": "http://yosneaker.com/upload/resources/generic/g1/M00/00/00/rB8cPFUGt5uAZOqZABERkp8NnYg942.jpg",
"articleAuthorId": 10,
"articleCreateTime": "2015-12-12",
"articleTrademarkId": 1,
"articleModelId": 1,
"items": [
{
"itemTitle": "测评项标题",
"itemLevel": 5,
"itemContent": "内容",
"itemImages": "http://yosneaker.com/upload/resources/generic/g1/M00/00/00/rB8cPFT-6EKAOdT_AAHe4oEsqCQ312.jpg"
},
{
"itemTitle": "测评项标题2",
"itemLevel": 1,
"itemContent": "内容2",
"itemImages": "http://yosneaker.com/upload/resources/generic/g1/M00/00/00/rB8cPFUJZtSAUcXtAAHe4oEsqCQ490.jpg"
}
]
}#####响应
{
'type':'SUCCESS',
'content':1 //测评id
}####获取热门测评
- URL :
http://api.yosneaker.com/store/articles/public - Method : Get
#####参数
| 名称 | 类型 | 必填 | 说明 |
| page | int | 否 | 当前页 |
| rows | int | 否 | 返回条数,默认十条 |
#####响应
{
'articles':[
{
'articleId':'测评ID',
'articleTitle':'标题',
'articleLevel':5,//星级
'articleImages':'封面地址'
'articleAuthorId':10,//作者id
'articleCreateTime':'2015'//创建时间
}],
'total':100
}####获取测评详情
- URL :
http://api.yosneaker.com/store/articles/{articleid} - Method : Get
#####参数
{articleid}
#####响应
{
"article":{
"id":1024,
"articleImages":"http://", --封页图片地址
"articleCreateTime":"2014-05-21", --发布时间
"articleReadCount":234, --阅读数
"articleTitle":"", --标题
"articleComment":"", --总评
"articleDescription":"", --描述
"articleLevel":2, --星级
"articleAuthorId",1 --作者id
},
"model":{ --型号
"modelId":1,
"modelName":"Air"
},
"brand":{ --品牌信息
"brandId",1
"brandName":"Nike"
},
"authorInfo":{ --作者信息
"thumbnail_portrait":http:", --缩略头像
"accountInfo":{ --个人数据
"height":"120cm", -- 身高
"weight":"50kg", -- 体重
"dump":"100m" --弹跳
}
},
"intendInfo":{ --产品意向数据
"wantCount":102, --想入人数
"buyCount":100 --已入人数
"wantAccounts":[{"id":10, "thumbnail_portrait":""}],
"buyAccounts":[{"id":10, "thumbnail_portrait":""}]
},
"items":[{ --测评项数据
"id":10, --id
"title":"", --测评项标题
"level":10, --星级
"images_urls":[""], --图片地址列表
"content":"" --描述
}],
"hotComments":[{ --热门评论
"articleCommentId":100, --评论id
"articleCommentContent":"", --评论内容
"articleCommentPublishTime":"2014-10-25", --发布时间
"articleCommentTopNumber":10, --点亮数
"accountInfo":{ --评论者信息
"id":100, --id
"name":"", --名字
"thumbnail_portrait":"" --缩略头像
}
}]
} ####添加评论接口
- URL :
http://api.yosneaker.com/store/comments - Method : POST
#####参数
{
"articleCommentArticleId": "测评ID(int)",
"articleCommentContent": "评论内容",
"articleCommentAccountId": "作者ID(int)",
"articleCommentToUserId": "被回复人的ID"
}#####响应
{
'type':'SUCCESS',
'content':1 //评论id
}####根据测评ID分页获取评论列表
- URL :
http://api.yosneaker.com/store/articles/{articleID}/comments?page=1&row=10 - Method : Get
#####参数
| 名称 | 类型 | 必填 | 说明 |
| page | int | 否 | 当前页 |
| rows | int | 否 | 返回条数,默认十条 |
#####响应
{
'comments':[
{
'articleCommentId':'评论ID(INT)',
'articleCommentContent':'评论内容',
'articleCommentPublishTime':'评论时间',
'articleCommentTopNumber':'点赞数目'
'articleCommentArticleId':10,//测评id
'articleCommentAccount':{ //评论人信息
'accountId':1 //用户ID
'accountUsername' :'rainy' //用户名
'accountImages' : 'href' //用户头像
}
}],
'total':100
}####上传图片
- URL :
http://api.yosneaker.com/upload/resources - Method : POST
#####参数
{
'name':'文件名',
'image':'文件BASE64字符串',
'extension':'文件扩展名'
}#####响应
{
'type':'SUCCESS',
'content':'图片的绝对路径'
}####获取图片
- URL :
http://api.yosneaker.com/upload/resources/generic/{图片的绝对路径} - Method : GET
#####参数 {图片的绝对路径} #####响应 二进制流
####获取品牌标签
- URL :
http://api.yosneaker.com/store/brands - Method : Get
#####参数 无 #####响应
{
'brands':[
{
'brandId':1,
'brandName':'Nike'
},
{
'brandId':2,
'brandName':'阿迪达斯'
}
]
}####根据品牌ID和关键字模糊查询型号列表
- URL :
http://api.yosneaker.com/store/brands/{brandId}/models?keyword='哈哈' - Method : Get
#####参数
| 名称 | 类型 | 必填 | 说明 |
| brandId | int | 是 | 品牌ID |
| keyword | int | 否 | 关键字 |
#####响应
{
'models':[{
'modelId':1,
'modelName':'Zoom Kobe 1',
'modelSeries':'',
'modelStory':'',
'brandId':1
}]
}####对鞋子型号的意向,可以是已入(1),和想入(0)
- URL :
http://api.yosneaker.com/store/models/action/want - Method : Get
#####参数
| 名称 | 类型 | 必填 | 说明 |
| intentionModelId | int | 是 | 鞋子型号ID |
| intentionAccountId | int | 是 | 用户id |
| intentionArticleType | int | 是 | 已入(值为1),和想入(值为0) |
{
'intentionModelId':1,
'intentionAccountId':1,
'intentionArticleType':0
}#####响应
{
'type':'SUCCESS',
'content':1 //评论id
}