Feed: items

Feed: items

首页数据,查询指定分类下的数据,数据类型有”node”, “publication”, “demand”.

Request

HTTP request

GET https://www.featapi.com/api/feed/items/{category_id}/

Parameters

  • Path parameters
Parameter nameValueDescription
category_idid or uncategory分类id 或 uncategory
  • Query parameters
Parameter nameValueDescription
Optional parameters
typestring类型:node,publication,demand,如/api/feed/items/1/?type=demand&page=1&page_size=8
within_distancestring手机端用来筛选指定距离内的对象,仅支持type=demand;距离(km),默认为5km
lngstring手机端用来筛选指定距离内的对象,仅支持type=demand;提交用户地理位置坐标
latstring手机端用来筛选指定距离内的对象,仅支持type=demand;提交用户地理位置坐标
pagestring
page_sizestring

授权

此请求需要具有以下所有范围的授权:

Scopes

有关更多信息,请参阅认证和授权页面。

Request body

Response

如果成功,则此方法在响应正文中返回 Dimzou.nodeDimzou.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

发表评论

您的电子邮箱地址不会被公开。

您可以使用以下 HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Captcha Code