Feeds
添加 RSS / ATOM 來源
CURD Resource
[GET][AUTH][CURRENT_USER] /api/feeds
取得當前用戶 Feed 列表。
response
json
{
"data": [
{
"id": 2,
"user_id": 2,
"url": "https:\/\/blocktempo.com\/feed",
"name": "hello",
"description": "there",
"status": "enabled",
"created_at": "2024-07-09T02:33:51.000000Z",
"updated_at": "2024-07-09T02:33:51.000000Z",
"deleted_at": null
},
],
"links": {
"first": "http:\/\/nordpress-next.test\/api\/feeds?page=1",
"last": "http:\/\/nordpress-next.test\/api\/feeds?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http:\/\/nordpress-next.test\/api\/feeds?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http:\/\/nordpress-next.test\/api\/feeds",
"per_page": 10,
"to": 10,
"total": 10
}
}[POST][AUTH][CURRENT_USER] /api/feeds
建立當前用戶 Feed。
validation
- url: required, url:http, https
- name: required,str
- description: required,str
- status: required, in:enabled,disabled
request
json
{
"name": "hello collection",
"visibility": "public",
"slug": "hello-coll1ection",
"description": "hello collection"
}response
json
{
"data": {
"url": "https:\/\/blocktempo.com\/feed",
"name": "hello",
"description": "there",
"status": "enabled",
"user_id": 2,
"updated_at": "2024-07-09T02:27:32.000000Z",
"created_at": "2024-07-09T02:27:32.000000Z",
"id": 1
}
}[GET][AUTH][CURRENT_USER] /api/feeds/:id
當前用戶取得指定 Feed。
response
json
{
"data": {
"id": 1,
"user_id": 2,
"url": "https:\/\/blocktempo.com\/feed",
"name": "hello",
"description": "there",
"status": "enabled",
"created_at": "2024-07-09T02:27:32.000000Z",
"updated_at": "2024-07-09T02:27:32.000000Z",
"deleted_at": null,
"user": {
"id": 2,
"name": "h11eel",
"username": "yish",
"email": "131111311111@tt.com",
"email_verified_at": null,
"two_factor_secret": null,
"two_factor_recovery_codes": null,
"created_at": "2024-07-01T07:19:33.000000Z",
"updated_at": "2024-07-01T07:19:33.000000Z"
}
}
}[PUT][AUTH][CURRENT_USER] /api/feeds/:id
更新當前用戶添加的 Feed。
request
json
{
"url": "https://www.blocktempo.com/feed",
"name": "block tempo",
"description": "hello, there",
"status": "enabled"
}response
json
{
"data": {
"url": "https:\/\/blocktempo.com\/feed",
"name": "hello",
"description": "there",
"status": "enabled",
"user_id": 2,
"updated_at": "2024-07-09T02:27:32.000000Z",
"created_at": "2024-07-09T02:27:32.000000Z",
"id": 1
}
}[DELETE][AUTH][CURRENT_USER] /api/feeds/:id
刪除當前用戶添加的 Feed。
response
HTTP_NO_CONTENT = 204