类别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
-3request error用户不存在400
-2api disableApi不可用404
-1user have not right没有权限403
0request 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部分同上