BookStack/dev/api/responses/shelves-read.json
Dan Brown 29705a25ce
Reviewed and added testing for BookShelf API implementation
- Tweaked how books are passed on update to prevent unassignment if
parameter is not provided.
- Added books to validation so they show in docs.
- Added request/response examples.
- Added tests to cover.
- Added child book info to shelf info.

Review of #1908
2020-04-10 15:19:18 +01:00

60 lines
No EOL
1.4 KiB
JSON

{
"id": 14,
"name": "My shelf",
"slug": "my-shelf",
"description": "This is my shelf with some books",
"created_by": {
"id": 1,
"name": "Admin",
"image_id": 48
},
"updated_by": {
"id": 1,
"name": "Admin",
"image_id": 48
},
"image_id": 501,
"created_at": "2020-04-10 13:24:09",
"updated_at": "2020-04-10 13:31:04",
"tags": [
{
"id": 16,
"entity_id": 14,
"entity_type": "BookStack\\Bookshelf",
"name": "Category",
"value": "Guide",
"order": 0,
"created_at": "2020-04-10 13:31:04",
"updated_at": "2020-04-10 13:31:04"
}
],
"cover": {
"id": 501,
"name": "anafrancisconi_Sp04AfFCPNM.jpg",
"url": "http://bookstack.local/uploads/images/cover_book/2020-04/anafrancisconi_Sp04AfFCPNM.jpg",
"created_at": "2020-04-10 13:31:04",
"updated_at": "2020-04-10 13:31:04",
"created_by": 1,
"updated_by": 1,
"path": "/uploads/images/cover_book/2020-04/anafrancisconi_Sp04AfFCPNM.jpg",
"type": "cover_book",
"uploaded_to": 14
},
"books": [
{
"id": 5,
"name": "Sint explicabo alias sunt.",
"slug": "jbsQrzuaXe"
},
{
"id": 1,
"name": "BookStack User Guide",
"slug": "bookstack-user-guide"
},
{
"id": 3,
"name": "Molestiae doloribus sint velit suscipit dolorem.",
"slug": "H99QxALaoG"
}
]
}