返回指定出版物的相关出版物。
Request
HTTP request
GET https://www.featapi.com/api/dimzou/publication/{id}/related/
Parameters
- Path parameters
Parameter name | Value | Description |
---|---|---|
Required parameters | ||
id | id | 出版物对应的id |
- Query parameters
Parameter name | Value | Description |
---|---|---|
Optional parameters | ||
x | id | 不希望出现的出版物id,有多个时可采用?x=1&x=2或?x[]=1&x[]=2等方式指定。 |
Response
如果成功,则此方法在响应正文中返回Dimzou.publication资源。
200 成功返回相关出版物数据
{
"pagination": {
"page_size": 50,
"total_count": 2,
"total_pages": 1,
"current_page": 1,
"next": null,
"previous": null
},
"data": [
{
"id": 2293,
"node_id": 8542,
"bundle_id": 8194,
"title": "877",
"summary": "<p>9989888222</p>",
"cover": "https://10.0.10.117:8013/media/1323967784911/dimzou/publication/20220124_5B33936_cover.png",
"author": {
"uid": 1323967784911,
"avatar": "https://10.0.10.117:8004/media/default_avatar.png",
"expertise": "写bug",
"firstname": "名",
"lastname": "🤔?🧧",
"username": "🤔?🧧 名",
"timezone": "Asia/Shanghai",
"timezone_utc_offset": "+08:00",
"is_online": true,
"location": "广州市",
"avatars": {
"path": "https://10.0.10.117:8004/media/default_avatar.png",
"sizes": {},
"default": true
},
"date_joined": "2021-11-29T07:34:06.890868Z",
"is_guest": false
},
"translator": null,
"category": {
"id": 424,
"name": "苹果🍎",
"parent_id": 423,
"kind": "category",
"slug": "2bd55304-b883-48fb-9f6d-c7687be2e5de",
"approved_at": "2021-12-06T02:39:33.998995Z",
"created_at": "2021-12-06T02:39:34.001460Z",
"deleted_at": null,
"level": 3
},
"created_at": "2022-01-24T07:44:07.497629Z",
"updated_at": "2022-01-24T07:44:07.497646Z",
"pub_type": 0,
"template": "I",
"covers": {
"path": "https://10.0.10.117:8013/media/1323967784911/dimzou/publication/20220124_5B33936_cover.png",
"sizes": {
"cover_sm": {
"width": 300.0,
"height": 300.0,
"path": "https://10.0.10.117:8013/media/cover_sm/1323967784911/dimzou/publication/20220124_5B33936_cover_300x300.JPEG"
},
"cover_md": {
"width": 1200.0,
"height": null,
"path": "https://10.0.10.117:8013/media/cover_md/1323967784911/dimzou/publication/20220124_5B33936_cover_x1200.JPEG"
}
}
},
"is_binding_publish": false,
"language": "zh-CN"
},
{
"id": 2284,
"node_id": 8516,
"bundle_id": 8171,
"title": "归档测试",
"summary": "<p>这是归档接口测试的</p>",
"cover": "https://10.0.10.117:8013/media/9915751779367/dimzou/reword/300/20220105_1392BDE_cropped_image.jpg",
"author": {
"uid": 9915751779367,
"avatar": "https://10.0.10.117:8004/media/9915751779367/avatar/avatar_1627864699.jpeg",
"expertise": "什么厉害的?",
"firstname": "Kyra",
"lastname": "Wolff",
"username": "Wolff Kyra",
"timezone": "America/New_York",
"timezone_utc_offset": "-05:00",
"is_online": true,
"location": "New York",
"avatars": {
"path": "https://10.0.10.117:8004/media/9915751779367/avatar/avatar_1627864699.jpeg",
"sizes": {
"sm": {
"width": 32.0,
"height": 32.0,
"path": "https://10.0.10.117:8004/media/sm/9915751779367/avatar/avatar_1627864699_32x32.JPEG"
},
"md": {
"width": 64.0,
"height": 64.0,
"path": "https://10.0.10.117:8004/media/md/9915751779367/avatar/avatar_1627864699_64x64.JPEG"
},
"lg": {
"width": 300.0,
"height": 300.0,
"path": "https://10.0.10.117:8004/media/lg/9915751779367/avatar/avatar_1627864699_300x300.JPEG"
}
}
},
"date_joined": "2019-01-18T08:12:50Z",
"is_guest": false
},
"translator": null,
"category": {
"id": 424,
"name": "苹果🍎",
"parent_id": 423,
"kind": "category",
"slug": "2bd55304-b883-48fb-9f6d-c7687be2e5de",
"approved_at": "2021-12-06T02:39:33.998995Z",
"created_at": "2021-12-06T02:39:34.001460Z",
"deleted_at": null,
"level": 3
},
"created_at": "2022-01-12T07:11:57.459102Z",
"updated_at": "2022-01-12T07:11:57.459115Z",
"pub_type": 0,
"template": "I",
"covers": {
"path": "https://10.0.10.117:8013/media/9915751779367/dimzou/reword/300/20220105_1392BDE_cropped_image.jpg",
"sizes": {
"cover_sm": {
"width": 300.0,
"height": 300.0,
"path": "https://10.0.10.117:8013/media/cover_sm/9915751779367/dimzou/reword/300/20220105_1392BDE_cropped_image_300x300.JPEG"
},
"cover_md": {
"width": 1200.0,
"height": null,
"path": "https://10.0.10.117:8013/media/cover_md/9915751779367/dimzou/reword/300/20220105_1392BDE_cropped_image_x1200.JPEG"
}
}
},
"is_binding_publish": false,
"language": "zh-CN"
}
]
}
404 Not found
示例返回数据可参考 API Common – Resource Not Found