类别Api
注意:所有请求均需要token,如需使用该Api,请立即申请
名称 | 方式 | 地址 | 权限 | |
1 | 获取类别子目录 | GET | /v1/categories?token=:token&id=:id | Service |
2 | 获取类别详情 | GET | /v1/categories/:id?token=:token | Service |
模型信息
:category
{
"Id": "100",
"Title": "other",
"Alias": "other",
"Description": "3d",
"Image": "",
"ParentId": "99",
"IsActive": "1",
"Ordering": "0"
}
错误码
错误码 | 错误信息 | 含义 | status code |
-3 | request error | 用户不存在 | 400 |
-2 | api disable | Api不可用 | 404 |
-1 | user have not right | 没有权限 | 403 |
0 | request error | 其他 | 400 |
-
一,获取类别子目录信息
GET http://api.techbrood.com/v1/categories?token=:token&id=:id
:token 为用户申请api-token(必须)
:id 为所需获取模型类别(必须)
{ "status":1, "message":"获取类别子目录成功!", "result":[:category,:category...] }
其中:category部分同上
-
二, 获取类别详细信息
GET http://api.techbrood.com/v1/categories/:id?token=:token
返回详细信息,返回status=1
{ "status":1, "message":"获取详情成功!", "result"::category }
其中:category部分同上