1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Added examples, updated docs for image gallery api endpoints

This commit is contained in:
Dan Brown
2023-03-15 11:37:03 +00:00
parent 3a808fd768
commit 402eb845ab
7 changed files with 145 additions and 5 deletions

View File

@ -0,0 +1,3 @@
{
"name": "My updated image name"
}

View File

@ -0,0 +1,28 @@
{
"name": "cute-cat-image.png",
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"type": "gallery",
"uploaded_to": 1,
"created_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"updated_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"updated_at": "2023-03-15 08:17:37",
"created_at": "2023-03-15 08:17:37",
"id": 618,
"thumbs": {
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
},
"content": {
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"cute-cat-image.png\"><\/a>",
"markdown": "![cute-cat-image.png](https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png)"
}
}

View File

@ -0,0 +1,41 @@
{
"data": [
{
"id": 1,
"name": "My cat scribbles",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-02\/scribbles.jpg",
"path": "\/uploads\/images\/gallery\/2023-02\/scribbles.jpg",
"type": "gallery",
"uploaded_to": 1,
"created_by": 1,
"updated_by": 1,
"created_at": "2023-02-12T16:34:57.000000Z",
"updated_at": "2023-02-12T16:34:57.000000Z"
},
{
"id": 2,
"name": "Drawing-1.png",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/drawio\/2023-02\/drawing-1.png",
"path": "\/uploads\/images\/drawio\/2023-02\/drawing-1.png",
"type": "drawio",
"uploaded_to": 2,
"created_by": 2,
"updated_by": 2,
"created_at": "2023-02-12T16:39:19.000000Z",
"updated_at": "2023-02-12T16:39:19.000000Z"
},
{
"id": 8,
"name": "beans.jpg",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-02\/beans.jpg",
"path": "\/uploads\/images\/gallery\/2023-02\/beans.jpg",
"type": "gallery",
"uploaded_to": 6,
"created_by": 1,
"updated_by": 1,
"created_at": "2023-02-15T19:37:44.000000Z",
"updated_at": "2023-02-15T19:37:44.000000Z"
}
],
"total": 3
}

View File

@ -0,0 +1,28 @@
{
"id": 618,
"name": "cute-cat-image.png",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"created_at": "2023-03-15 08:17:37",
"updated_at": "2023-03-15 08:17:37",
"created_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"updated_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"type": "gallery",
"uploaded_to": 1,
"thumbs": {
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
},
"content": {
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"cute-cat-image.png\"><\/a>",
"markdown": "![cute-cat-image.png](https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png)"
}
}

View File

@ -0,0 +1,28 @@
{
"id": 618,
"name": "My updated image name",
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"created_at": "2023-03-15 08:17:37",
"updated_at": "2023-03-15 08:24:50",
"created_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"updated_by": {
"id": 1,
"name": "Admin",
"slug": "admin"
},
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
"type": "gallery",
"uploaded_to": 1,
"thumbs": {
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
},
"content": {
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"My updated image name\"><\/a>",
"markdown": "![My updated image name](https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png)"
}
}