]> BookStack Code Mirror - bookstack/commitdiff
Input WYSIWYG: Updated API examples to align with changes
authorDan Brown <redacted>
Fri, 22 Dec 2023 14:37:48 +0000 (14:37 +0000)
committerDan Brown <redacted>
Fri, 22 Dec 2023 14:37:48 +0000 (14:37 +0000)
12 files changed:
dev/api/requests/books-create.json
dev/api/requests/books-update.json
dev/api/requests/chapters-create.json
dev/api/requests/chapters-update.json
dev/api/requests/shelves-create.json
dev/api/requests/shelves-update.json
dev/api/responses/books-create.json
dev/api/responses/books-update.json
dev/api/responses/chapters-create.json
dev/api/responses/chapters-update.json
dev/api/responses/shelves-create.json
dev/api/responses/shelves-update.json

index 2a38dba8392fda308cdf460a45e159bd74853bce..71dbdcc658d8577ff97589b1c02560d5959ae643 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "My own book",
-  "description": "This is my own little book",
-  "default_template_id": 12,
+  "description_html": "<p>This is <strong>my</strong> own little book created via the API</p>",
+  "default_template_id": 2427,
   "tags": [
     {"name": "Category", "value": "Top Content"},
     {"name": "Rating", "value": "Highest"}
index c026b7b4943f549534f224732a01f0fec26e6c6a..30ce7e95af4d50eecb5a4e2b9d9fe48bebea1478 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "My updated book",
-  "description": "This is my book with updated details",
-  "default_template_id": 12,
+  "description_html": "<p>This is my book with <em>updated</em> details</p>",
+  "default_template_id": 2427,
   "tags": [
     {"name": "Subject", "value": "Updates"}
   ]
index a7a0e072c6c6db48a8727400399edd2907c37999..e9d9033874e91ae33feac193fad1ed8025d128bb 100644 (file)
@@ -1,7 +1,7 @@
 {
   "book_id": 1,
   "name": "My fantastic new chapter",
-  "description": "This is a great new chapter that I've created via the API",
+  "description_html": "<p>This is a <strong>great new chapter</strong> that I've created via the API</p>",
   "priority": 15,
   "tags": [
     {"name": "Category", "value": "Top Content"},
index 18c40301b6d7a6784b4ee3c88ddcf1b1967d3b1d..be675772bc6d26ac5a1dfc055cd10d98d414b358 100644 (file)
@@ -1,7 +1,7 @@
 {
   "book_id": 1,
   "name": "My fantastic updated chapter",
-  "description": "This is an updated chapter that I've altered via the API",
+  "description_html": "<p>This is an <strong>updated chapter</strong> that I've altered via the API</p>",
   "priority": 16,
   "tags": [
     {"name": "Category", "value": "Kinda Good Content"},
index 39b88af7e009969664d226b7537478582cb685a7..8f35340f65dd16cad2b8aa95b8f76f4dfc3ba4f6 100644 (file)
@@ -1,5 +1,8 @@
 {
   "name": "My shelf",
-  "description": "This is my shelf with some books",
-  "books": [5,1,3]
+  "description_html": "<p>This is <strong>my shelf</strong> with some books</p>",
+  "books": [5,1,3],
+  "tags": [
+    {"name": "Category", "value": "Learning"}
+  ]
 }
\ No newline at end of file
index df5f5735de0cb97098d598c7f92d6d2651e3e3c2..081c8f4c1f0ec7ce449720c8eb62234e2395e5d2 100644 (file)
@@ -1,5 +1,5 @@
 {
   "name": "My updated shelf",
-  "description": "This is my update shelf with some books",
+  "description_html": "<p>This is my <em>updated shelf</em> with some books</p>",
   "books": [5,1,3]
 }
\ No newline at end of file
index 773879125356cfca262a340ce4d42325a2ce98ca..8895fb854d43f2f8fd1e5b863928c6493af5c610 100644 (file)
@@ -1,12 +1,26 @@
 {
-  "id": 15,
-  "name": "My new book",
-  "slug": "my-new-book",
-  "description": "This is a book created via the API",
+  "id": 226,
+  "name": "My own book",
+  "slug": "my-own-book",
+  "description": "This is my own little book created via the API",
+  "created_at": "2023-12-22T14:22:28.000000Z",
+  "updated_at": "2023-12-22T14:22:28.000000Z",
   "created_by": 1,
   "updated_by": 1,
   "owned_by": 1,
-  "default_template_id": 12,
-  "updated_at": "2020-01-12T14:05:11.000000Z",
-  "created_at": "2020-01-12T14:05:11.000000Z"
+  "default_template_id": 2427,
+  "description_html": "<p>This is <strong>my<\/strong> own little book created via the API<\/p>",
+  "tags": [
+    {
+      "name": "Category",
+      "value": "Top Content",
+      "order": 0
+    },
+    {
+      "name": "Rating",
+      "value": "Highest",
+      "order": 0
+    }
+  ],
+  "cover": null
 }
\ No newline at end of file
index f69677c4ad79d3f75d89a4cedd5c3e415d3f9685..dafa2feb032315862c263f66034b55a8c27cb1c0 100644 (file)
@@ -1,12 +1,21 @@
 {
-  "id": 16,
+  "id": 226,
   "name": "My updated book",
   "slug": "my-updated-book",
   "description": "This is my book with updated details",
-  "created_at": "2020-01-12T14:09:59.000000Z",
-  "updated_at": "2020-01-12T14:16:10.000000Z",
+  "created_at": "2023-12-22T14:22:28.000000Z",
+  "updated_at": "2023-12-22T14:24:07.000000Z",
   "created_by": 1,
   "updated_by": 1,
   "owned_by": 1,
-  "default_template_id": 12
+  "default_template_id": 2427,
+  "description_html": "<p>This is my book with <em>updated<\/em> details<\/p>",
+  "tags": [
+    {
+      "name": "Subject",
+      "value": "Updates",
+      "order": 0
+    }
+  ],
+  "cover": null
 }
\ No newline at end of file
index cf47b123df7bb1027a2a5a5fe96bb61afd9d667a..183186b0b4295d1a895254a11cb097dd7c082cd4 100644 (file)
@@ -1,15 +1,16 @@
 {
-  "id": 74,
+  "id": 668,
   "book_id": 1,
   "slug": "my-fantastic-new-chapter",
   "name": "My fantastic new chapter",
   "description": "This is a great new chapter that I've created via the API",
   "priority": 15,
+  "created_at": "2023-12-22T14:26:28.000000Z",
+  "updated_at": "2023-12-22T14:26:28.000000Z",
   "created_by": 1,
   "updated_by": 1,
   "owned_by": 1,
-  "updated_at": "2020-05-22T22:59:55.000000Z",
-  "created_at": "2020-05-22T22:59:55.000000Z",
+  "description_html": "<p>This is a <strong>great new chapter<\/strong> that I've created via the API<\/p>",
   "tags": [
     {
       "name": "Category",
@@ -19,7 +20,7 @@
     {
       "name": "Rating",
       "value": "Highest",
-      "order": 1
+      "order": 0
     }
   ]
 }
\ No newline at end of file
index a4940af2df535d35e5cb65682984cdb821a76449..5ac3c64c12fdfa0684b0e9046c93dc483215725c 100644 (file)
@@ -1,16 +1,16 @@
 {
-  "id": 75,
+  "id": 668,
   "book_id": 1,
   "slug": "my-fantastic-updated-chapter",
   "name": "My fantastic updated chapter",
   "description": "This is an updated chapter that I've altered via the API",
   "priority": 16,
-  "created_at": "2020-05-22T23:03:35.000000Z",
-  "updated_at": "2020-05-22T23:07:20.000000Z",
+  "created_at": "2023-12-22T14:26:28.000000Z",
+  "updated_at": "2023-12-22T14:27:59.000000Z",
   "created_by": 1,
   "updated_by": 1,
   "owned_by": 1,
-  "book_slug": "bookstack-demo-site",
+  "description_html": "<p>This is an <strong>updated chapter<\/strong> that I've altered via the API<\/p>",
   "tags": [
     {
       "name": "Category",
@@ -20,7 +20,7 @@
     {
       "name": "Rating",
       "value": "Medium",
-      "order": 1
+      "order": 0
     }
   ]
 }
\ No newline at end of file
index 84caf8bdc869a8e0356f6b8f0b7acfef1ece47f2..235557834704ff587fb70599b1101145b62bfe45 100644 (file)
@@ -1,11 +1,20 @@
 {
-  "id": 14,
+  "id": 20,
   "name": "My shelf",
   "slug": "my-shelf",
   "description": "This is my shelf with some books",
   "created_by": 1,
   "updated_by": 1,
+  "created_at": "2023-12-22T14:33:52.000000Z",
+  "updated_at": "2023-12-22T14:33:52.000000Z",
   "owned_by": 1,
-  "created_at": "2020-04-10T13:24:09.000000Z",
-  "updated_at": "2020-04-10T13:24:09.000000Z"
+  "description_html": "<p>This is <strong>my shelf<\/strong> with some books<\/p>",
+  "tags": [
+    {
+      "name": "Category",
+      "value": "Learning",
+      "order": 0
+    }
+  ],
+  "cover": null
 }
\ No newline at end of file
index e199d8d68a552cfc96664ff6aa7ad09f33b20c84..3b3f0538e689017fe5bc3e7a271294dbee27689a 100644 (file)
@@ -1,11 +1,20 @@
 {
-  "id": 14,
+  "id": 20,
   "name": "My updated shelf",
   "slug": "my-updated-shelf",
-  "description": "This is my update shelf with some books",
+  "description": "This is my updated shelf with some books",
   "created_by": 1,
   "updated_by": 1,
+  "created_at": "2023-12-22T14:33:52.000000Z",
+  "updated_at": "2023-12-22T14:35:00.000000Z",
   "owned_by": 1,
-  "created_at": "2020-04-10T13:24:09.000000Z",
-  "updated_at": "2020-04-10T13:48:22.000000Z"
+  "description_html": "<p>This is my <em>updated shelf<\/em> with some books<\/p>",
+  "tags": [
+    {
+      "name": "Category",
+      "value": "Learning",
+      "order": 0
+    }
+  ],
+  "cover": null
 }
\ No newline at end of file