首页数据,查询指定分类下的数据,数据类型有”node”, “publication”, “demand”.
Request
HTTP request
GET https://www.featapi.com/api/feed/items/{category_id}/
Parameters
- Path parameters
Parameter name | Value | Description |
---|---|---|
category_id | id or uncategory | 分类id 或 uncategory |
- Query parameters
Parameter name | Value | Description |
---|---|---|
Optional parameters | ||
type | string | 类型:node,publication,demand,如/api/feed/items/1/?type=demand&page=1&page_size=8 |
within_distance | string | 手机端用来筛选指定距离内的对象,仅支持type=demand;距离(km),默认为5km |
lng | string | 手机端用来筛选指定距离内的对象,仅支持type=demand;提交用户地理位置坐标 |
lat | string | 手机端用来筛选指定距离内的对象,仅支持type=demand;提交用户地理位置坐标 |
page | string | |
page_size | string |
授权
此请求需要具有以下所有范围的授权:
Scopes |
---|
有关更多信息,请参阅认证和授权页面。
Request body
无
Response
如果成功,则此方法在响应正文中返回 Dimzou.node 或 Dimzou.publication 或 Service.demand 资源。
200 成功返回数据
{
"data": [
{
"title": "需要一名游泳教练",
"description": "需要一名游泳教练",
"tags": ["游泳"],
"auto_cover": "http://127.0.0.1:8000/media/6715983880802/demand_attach/202006111239A2E.png",
"auto_covers": {
"path": "http://127.0.0.1:8000/media/6715983880802/demand_attach/202006111239A2E.png",
"sizes": {
"demand_cover_md": {
"width": 300,
"height": 300,
"path": "http://127.0.0.1:8000/media/demand_cover_md/6715983880802/demand_attach/202006111239A2E_300x300.JPEG"
}
}
},
"images": [],
"author": {
"uid": 6715983880802,
"avatar": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
"expertise": "魔术",
"firstname": "淑珍",
"lastname": "杨",
"username": "淑珍 杨",
"timezone": "America/New_York",
"timezone_utc_offset": "-04:00",
"is_online": true,
"location": "New York",
"avatars": {
"path": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
"sizes": {
"sm": {
"width": 32,
"height": 32,
"path": "http://127.0.0.1:8000/media/sm/6715983880802/avatar/6715983880802_32x32.JPEG"
},
"md": {
"width": 64,
"height": 64,
"path": "http://127.0.0.1:8000/media/md/6715983880802/avatar/6715983880802_64x64.JPEG"
},
"lg": {
"width": 300,
"height": 300,
"path": "http://127.0.0.1:8000/media/lg/6715983880802/avatar/6715983880802_300x300.JPEG"
}
}
}
},
"service_address": null,
"closed_time": "2020-12-24T06:15:00Z",
"start_time": "2020-12-31T06:15:00Z",
"end_time": "2020-12-31T07:15:00Z",
"create_time": "2020-06-11T11:12:43.524847Z",
"update_at": "2020-06-11T11:12:51.164989Z",
"entity_type": "demand",
"kind": "feed",
"entity_id": 14,
"distance": 3.5493
} ],
"pagination": {
"page_size": 1,
"total_pages": 2,
"total_count": 2,
"current_page": 1,
"next": 2,
"previous": null
}
}
404 Not found
示例返回数据可参考 API Common – Resource Not Found