查询分类接口[列表]
- 接口说明: 查询分类接口[列表]
- 接口地址: /api/categories
- 请求方式: GET
请求参数
参数名称 | 类型 | 值 | 描述 |
---|
filter | array | | 过滤条件 |
createThread | int | 1 | 可发布主题的分类 |
请求示例
/api/categories
返回说明
- 成功,http 状态码: 200
- 失败,http 状态码: 404
返回结果
关联数据模型字段释义参见请参见相应文档
参数名称 | 类型 | 出现要求 | 描述 |
---|
links | object | | 接口链接 |
data | object | | 基础数据 |
type | string | | 数据类型 |
id | int | | 数据 id |
attributes | object | | 数据属性 |
attributes.name | string | | 分类名称 |
attributes.icon | string | | 分类图标 URL |
attributes.description | string | | 分类说明 |
attributes.property | int | | 属性:0:正常 1:首页展示 |
attributes.sort | int | | 显示顺序 |
attributes.threadCount | int | | 主题总数 |
返回示例
{
"data": [
{
"type": "categories",
"id": "1",
"attributes": {
"name": "Pike",
"description": "West Virginia Street panel Designer",
"icon": "",
"sort": 272,
"property": 0,
"thread_count": 0,
"ip": "127.0.0.1",
"created_at": "2019-12-02T17:53:16+08:00",
"updated_at": "2019-12-02T17:53:16+08:00"
}
},
{
"type": "categories",
"id": "2",
"attributes": {
"name": "transmitter",
"description": "Rustic Table",
"icon": "",
"sort": 394,
"property": 0,
"thread_count": 0,
"ip": "127.0.0.1",
"created_at": "2019-12-02T17:53:17+08:00",
"updated_at": "2019-12-02T17:53:17+08:00"
}
},
{
"type": "categories",
"id": "3",
"attributes": {
"name": "Metal",
"description": "Chief Swiss Franc matrix",
"icon": "",
"sort": 998,
"property": 0,
"thread_count": 0,
"ip": "127.0.0.1",
"created_at": "2019-12-02T17:53:18+08:00",
"updated_at": "2019-12-02T17:53:18+08:00"
}
}
]
}