PATCH examples and structure
authorChristian Weiske <cweiske@cweiske.de>
Sun, 7 Mar 2021 18:02:04 +0000 (19:02 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 7 Mar 2021 18:02:04 +0000 (19:02 +0100)
18 files changed:
api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-set.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-highlight-add.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-highlight-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-note-add.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-note-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.request-reading-position.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-set.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-highlight-add.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-highlight-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-note-add.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-note-remove.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.response-reading-position.json [new file with mode: 0644]
api/pageplace.bosh-bosh-rest-sync-data.rst
api/pageplace.family-v1-shares.response-2books.json [moved from api/pageplace.family-v1-shares.response-3books.json with 100% similarity]
api/pageplace.family-v1-shares.rst
api/pageplace.inventory-v2-inventory.rst

diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-remove.json
new file mode 100644 (file)
index 0000000..0f2594c
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "revision": "vXVBokvmktlTYbt8GBkbdS1LtinZbt31qkl7c+VWPTUc/H7JQ89XcdH7Vyavf2z8Q4v5leJHCbuOXUAF0KLZkwz0WtYM5Z+0AWeOd0GVVw1Rkh56bz8Ac0Hmkxo/UPnW",
+  "patches": [
+    {
+      "value": {
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:114)",
+        "revision": "vXVBokvmktlTYbt8GBkbdS1LtinZbt31qkl7c+VWPTUfsIea2eDXWJ5LfkTKgnbEIAtm25oVIvqtV5nh+yF8WfGiJxRRL4PTehaj8GE602P8qdr/xEd8NYp5U6t+61jTJwWFNH62T4CYaO/tyH0H3g==",
+        "modified": 1612127588570,
+        "name": "um hochzukommen, so groß war er geworden. Bald kam die Zeit, dass er ein eigenes Nest gründen würde. Doch seine Interessen lagen woanders. Er wollte die Pyramiden erforschen, hinter ihre Geheimnisse s"
+      },
+      "path": "/publications/DT0400.9783739673417_A27522964/dogears/606874450",
+      "op": "remove"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-set.json b/api/pageplace.bosh-bosh-rest-sync-data.request-bookmark-set.json
new file mode 100644 (file)
index 0000000..f4d88ab
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "revision": "Ag8/+tS7R94xYEG0pdHJi/+ryrjap1XVfo6lsLcWpxoD/GW/SvezBcSBzktnf1qQGZegE9K5nwrYu2B2XeBAADCDQ9ilcFjDuwcPWJKk20SXwlB8aoC3YGRRj6+8azNv",
+  "patches": [
+    {
+      "value": {
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:114)",
+        "revision": null,
+        "modified": 1612127562802,
+        "name": "um hochzukommen, so groß war er geworden. Bald kam die Zeit, dass er ein eigenes Nest gründen würde. Doch seine Interessen lagen woanders. Er wollte die Pyramiden erforschen, hinter ihre Geheimnisse s",
+        "transientId": "3"
+      },
+      "path": "/publications/DT0400.9783739673417_A27522964/dogears",
+      "op": "add"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-highlight-add.json b/api/pageplace.bosh-bosh-rest-sync-data.request-highlight-add.json
new file mode 100644 (file)
index 0000000..5a0aa9a
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "vXVBokvmktlTYbt8GBkbdc+yMZgMJzQNMwBgm+4XVPUzyzLIOZTcxGsPmPWySpedk9yrsUonISPHw+Kwd539kJQX6x8933NH0Hhp9gOoSPfakpEel4/uiG+kHpq0GqrS",
+  "patches": [
+    {
+      "path": "/publications/DT0400.9783739673417_A27522964/comments",
+      "value": {
+        "revision": null,
+        "text": "Dass sie Mysterien bürgen, die ihrer aller Leben von Grund auf veränderten. Er wollte studieren, doch gehörte er nur einem kleinen Farmerstamm an. Der bedeutungslos, weit außerhalb der großen Ansiedlungen, seine Au",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:682)",
+        "modified": 1612127738093,
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:463)",
+        "transientId": "11"
+      },
+      "op": "add"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-highlight-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.request-highlight-remove.json
new file mode 100644 (file)
index 0000000..6ec8507
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "revision": "mpUEbwYtp/eTagD0N86YpmDfuHc9O9NiQuGXKm3W/Hw6kiAzVlOHYaJYF3sCUNxUdanemyU8jvsTIkSJe4EeZSVugO5ALKPSFiYcaMWekNSyeSeiGXHXVnx6WCiBrpnJ",
+  "patches": [
+    {
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876020",
+      "value": {
+        "revision": "mpUEbwYtp/eTagD0N86YpmDfuHc9O9NiQuGXKm3W/HzKtqyrc3pLZBtEfixwK6/TwRHTxnb2tzpI7SUOBZdRrCGJ53Gmzjz6qBsW1xEVyFM5++J3MUSW/vu1egX6wv1m+dGa/u3Xy8Vzrn/rvwTfvA==",
+        "text": "Dass sie Mysterien bürgen, die ihrer aller Leben von Grund auf veränderten. Er wollte studieren, doch gehörte er nur einem kleinen Farmerstamm an. Der bedeutungslos, weit außerhalb der großen Ansiedlungen, seine Au",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:682)",
+        "modified": 1612127804121,
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:463)"
+      },
+      "op": "remove"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-note-add.json b/api/pageplace.bosh-bosh-rest-sync-data.request-note-add.json
new file mode 100644 (file)
index 0000000..f30e231
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "revision": "mpUEbwYtp/eTagD0N86Ypvl4Mzbf6ddMxlIZRmiD007iIIVRjSkpSWU5SS/bYaVeN4irJYl9nIs8N1Z1O8k9r4yZPEN6LkrJ03n7hG73yWEkJBqK7dQr8rNheL8GgQGC",
+  "patches": [
+    {
+      "path": "/publications/DT0400.9783739673417_A27522964/comments",
+      "value": {
+        "revision": null,
+        "text": "Bibliotheken",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:864)",
+        "note": "really?",
+        "modified": 1612127863357,
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:852)",
+        "transientId": "12"
+      },
+      "op": "add"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-note-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.request-note-remove.json
new file mode 100644 (file)
index 0000000..8d51eaf
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "U56mFMWtmzUafX7fZ5csYkOTAR0uWN7NcapDRKi+whDBSXuc4SUQl1X3PGUvSMVadbPpnCaITL9ES5XmJItpf5rm0tRbjqV1kSe6iXWdaKLwjT6o7TeGF3U2cbwSPWa9",
+  "patches": [
+    {
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876958",
+      "value": {
+        "revision": "U56mFMWtmzUafX7fZ5csYkOTAR0uWN7NcapDRKi+whDQU/nHOmicjMaixgoF33Oc9NMXK2tldJW9Nix9Lv5LaVnTuHf7tMxcmKKHwwqX8CWts7Ebaba8fX6Ts5MlroFxuF45ERlNPKneIKrLZbuMuQ==",
+        "text": "Bibliotheken",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:864)",
+        "note": "really?",
+        "modified": 1612127893444,
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:852)"
+      },
+      "op": "remove"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.request-reading-position.json b/api/pageplace.bosh-bosh-rest-sync-data.request-reading-position.json
new file mode 100644 (file)
index 0000000..2fee706
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "Lmu7TngaxhKWHdv2FFktQNcGFPmnOshpANcqFEx7udp9diud9qWGmETRXuQsftz8POQVhe8wrcIy0g4ohwngk3/kdM5IeWkV+jmzPXxVKDs+5KTzHlGTFGz2QeVeXJue",
+  "patches": [
+    {
+      "value": {
+        "lastPosition": "12",
+        "progress": 0.4166666567325592,
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/8/1:0)",
+        "revision": "Lmu7TngaxhKWHdv2FFktQNcGFPmnOshpANcqFEx7udpEDvQDdiq93W8ryZG4oSfm9D9sp2Aowkhu/1wg8qj4PglnxUFM96DOLgZMd9NVnTByM/ZG1vgkHHCrqwpA/7bO67OjTjo1TLKVL442Lx3sGw==",
+        "currentPosition": "5",
+        "modified": 1612116637854
+      },
+      "path": "/publications/DT0400.9783739673417_A27522964/bookmark/606779074",
+      "op": "replace"
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-remove.json
new file mode 100644 (file)
index 0000000..cc10783
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "revision": "vXVBokvmktlTYbt8GBkbdc+yMZgMJzQNMwBgm+4XVPUzyzLIOZTcxGsPmPWySpedk9yrsUonISPHw+Kwd539kJQX6x8933NH0Hhp9gOoSPfakpEel4/uiG+kHpq0GqrS",
+  "patches": [
+    {
+      "op": "remove",
+      "path": "/publications/DT0400.9783739673417_A27522964/dogears/606874450",
+      "value": {
+        "revision": "vXVBokvmktlTYbt8GBkbdc+yMZgMJzQNMwBgm+4XVPWdBAxDuBxbQJfnRXNZ4kSW2jY9yt5T2BQHYyn0oOefNmoJQlBJc++COD/meOP71PA/NsIvqt8YDoldSv5Q+CFpAs0HInj5rcupcKXBU4WURw==",
+        "modified": 1612127588570,
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:114)",
+        "name": "um hochzukommen, so groß war er geworden. Bald kam die Zeit, dass er ein eigenes Nest gründen würde. Doch seine Interessen lagen woanders. Er wollte die Pyramiden erforschen, hinter ihre Geheimnisse s"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-set.json b/api/pageplace.bosh-bosh-rest-sync-data.response-bookmark-set.json
new file mode 100644 (file)
index 0000000..1c0076a
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "revision": "vXVBokvmktlTYbt8GBkbdS1LtinZbt31qkl7c+VWPTUc/H7JQ89XcdH7Vyavf2z8Q4v5leJHCbuOXUAF0KLZkwz0WtYM5Z+0AWeOd0GVVw1Rkh56bz8Ac0Hmkxo/UPnW",
+  "patches": [
+    {
+      "op": "add",
+      "path": "/publications/DT0400.9783739673417_A27522964/dogears/606874450",
+      "value": {
+        "revision": "vXVBokvmktlTYbt8GBkbdS1LtinZbt31qkl7c+VWPTUfsIea2eDXWJ5LfkTKgnbEIAtm25oVIvqtV5nh+yF8WfGiJxRRL4PTehaj8GE602P8qdr/xEd8NYp5U6t+61jTJwWFNH62T4CYaO/tyH0H3g==",
+        "modified": 1612127562802,
+        "transientId": "3",
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:114)",
+        "name": "um hochzukommen, so groß war er geworden. Bald kam die Zeit, dass er ein eigenes Nest gründen würde. Doch seine Interessen lagen woanders. Er wollte die Pyramiden erforschen, hinter ihre Geheimnisse s"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-highlight-add.json b/api/pageplace.bosh-bosh-rest-sync-data.response-highlight-add.json
new file mode 100644 (file)
index 0000000..a4f7144
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "mpUEbwYtp/eTagD0N86YpmDfuHc9O9NiQuGXKm3W/Hw6kiAzVlOHYaJYF3sCUNxUdanemyU8jvsTIkSJe4EeZSVugO5ALKPSFiYcaMWekNSyeSeiGXHXVnx6WCiBrpnJ",
+  "patches": [
+    {
+      "op": "add",
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876020",
+      "value": {
+        "revision": "mpUEbwYtp/eTagD0N86YpmDfuHc9O9NiQuGXKm3W/HzKtqyrc3pLZBtEfixwK6/TwRHTxnb2tzpI7SUOBZdRrCGJ53Gmzjz6qBsW1xEVyFM5++J3MUSW/vu1egX6wv1m+dGa/u3Xy8Vzrn/rvwTfvA==",
+        "modified": 1612127738093,
+        "transientId": "11",
+        "text": "Dass sie Mysterien bürgen, die ihrer aller Leben von Grund auf veränderten. Er wollte studieren, doch gehörte er nur einem kleinen Farmerstamm an. Der bedeutungslos, weit außerhalb der großen Ansiedlungen, seine Au",
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:463)",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:682)"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-highlight-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.response-highlight-remove.json
new file mode 100644 (file)
index 0000000..58357b4
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "revision": "mpUEbwYtp/eTagD0N86Ypvl4Mzbf6ddMxlIZRmiD007iIIVRjSkpSWU5SS/bYaVeN4irJYl9nIs8N1Z1O8k9r4yZPEN6LkrJ03n7hG73yWEkJBqK7dQr8rNheL8GgQGC",
+  "patches": [
+    {
+      "op": "remove",
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876020",
+      "value": {
+        "revision": "mpUEbwYtp/eTagD0N86Ypvl4Mzbf6ddMxlIZRmiD006/DLEE5jYDKecIq5j4vZPOwkSBnzwhepvJ2yCb2LtBnEXpgQStn2FDw78xI/l7M9L+yWtHyOte1/u+6tcebmfbQZ2JQFfSnzsbv0FfVKEWcg==",
+        "modified": 1612127804121,
+        "text": "Dass sie Mysterien bürgen, die ihrer aller Leben von Grund auf veränderten. Er wollte studieren, doch gehörte er nur einem kleinen Farmerstamm an. Der bedeutungslos, weit außerhalb der großen Ansiedlungen, seine Au",
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:463)",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:682)"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-note-add.json b/api/pageplace.bosh-bosh-rest-sync-data.response-note-add.json
new file mode 100644 (file)
index 0000000..51e8e23
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "revision": "U56mFMWtmzUafX7fZ5csYkOTAR0uWN7NcapDRKi+whDBSXuc4SUQl1X3PGUvSMVadbPpnCaITL9ES5XmJItpf5rm0tRbjqV1kSe6iXWdaKLwjT6o7TeGF3U2cbwSPWa9",
+  "patches": [
+    {
+      "op": "add",
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876958",
+      "value": {
+        "revision": "U56mFMWtmzUafX7fZ5csYkOTAR0uWN7NcapDRKi+whDQU/nHOmicjMaixgoF33Oc9NMXK2tldJW9Nix9Lv5LaVnTuHf7tMxcmKKHwwqX8CWts7Ebaba8fX6Ts5MlroFxuF45ERlNPKneIKrLZbuMuQ==",
+        "modified": 1612127863357,
+        "transientId": "12",
+        "note": "really?",
+        "text": "Bibliotheken",
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:852)",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:864)"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-note-remove.json b/api/pageplace.bosh-bosh-rest-sync-data.response-note-remove.json
new file mode 100644 (file)
index 0000000..a01a853
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "U56mFMWtmzUafX7fZ5csYhWlue/h+S4oouwYyFXwpjgOs/YSwYakpSm1LTq6XVVxh8V62/30ckl8lpwzXmUZBOujhb/tiVqNXdUxpziOw/rO/8CFfWkQ5BICMla72gc9",
+  "patches": [
+    {
+      "op": "remove",
+      "path": "/publications/DT0400.9783739673417_A27522964/comments/606876958",
+      "value": {
+        "revision": "U56mFMWtmzUafX7fZ5csYhWlue/h+S4oouwYyFXwpjgyQfuwkmVsFDbhY7YqNV0euelu0VHF/tnDmzOk/GmUEkHQWOVBHcNh7pzh0s9s5SiJrK4BDKA/cl7Ojj5OAhCI5VatYCvpP4QQNqqUafK27Q==",
+        "modified": 1612127893444,
+        "note": "really?",
+        "text": "Bibliotheken",
+        "startPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:852)",
+        "endPosition": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:864)"
+      }
+    }
+  ]
+}
diff --git a/api/pageplace.bosh-bosh-rest-sync-data.response-reading-position.json b/api/pageplace.bosh-bosh-rest-sync-data.response-reading-position.json
new file mode 100644 (file)
index 0000000..5a778f9
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "revision": "re5zwHogt+YaBKoqI/FPaER+kwC+lp76xohw4+17pWOQ/NPM4AJQbeRddT3Tl2PFYhMbsJy1mYLWJXtvb3bvcgTJ1mcFy/qfb6QqypvFhZK8AloBfu3iGAc7idteGLzb",
+  "patches": [
+    {
+      "op": "replace",
+      "path": "/publications/DT0400.9783739673417_A27522964/bookmark/606779074",
+      "value": {
+        "revision": "re5zwHogt+YaBKoqI/FPaER+kwC+lp76xohw4+17pWMpTJvUvgIModh4mMwgErEgAEsLMc19cJBs9VIeKIUZUZtKiHHD+M55cQ6+FwLBQkq3nd1fF9cO8QLcAoSFtwBa63M/JbWH85fh4BsuqEfX5g==",
+        "modified": 1612116637854,
+        "progress": 0.41666666,
+        "position": "OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/8/1:0)",
+        "currentPosition": "5",
+        "lastPosition": "12"
+      }
+    }
+  ]
+}
index 87535464f1eebe49183b4657e1e2934e3ad04aa9..64097f1ebfe2f29f297b0b3892077c7e1735e10e 100644 (file)
@@ -38,7 +38,112 @@ Request body parameters
 
     No data to sync: Empty array ``[]``.
 
-    FIXME: document structure
+    Changes are objects with the following properties:
+
+    ``op``
+      The patch operation: ``add``, ``replace``, ``remove``
+
+      ``replace`` is used to update the reading position.
+
+    ``path``
+      Example: ``/publications/DT0400.9783739673417_A27522964/bookmark/606779074``
+
+      Consists of several parts:
+
+      1. The prefix seems always to be ``/publications/``.
+      2. A publication ID ``DT0400.9783739673417_A27522964``
+      3. The type that is created/updated/deleted:
+
+         - ``bookmark`` is the reading position
+         - ``dogears`` when bookmarking a page in the e-book
+         - ``comments`` when highlighting/marking some text or adding a note
+      4. FIXME: Some ID.
+
+    ``value``
+      Details of the change. Properties depend on the type.
+
+      ``modified``
+        Time when this action was done in milliseconds. Type: Integer.
+
+        Example: ``1612127562802``
+      ``position``
+        File name of the chapter in the epub,
+        plus specific data in the anchor. Type: String.
+
+        Example: ``OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:114)``
+      ``revision``
+        FIXME. Type: String.
+
+        FIXME: Can be ``null``. When?
+
+        The patch part revisions share some prefix with the patch revision,
+        but are a bit longer.
+        Seem to be base64-encoded, since the often (always?) have ``==`` at the end.
+
+        In the response, the patch part revisions also share some prefix with
+        the new server revision.
+
+        Example: ``Lmu7TngaxhKWHdv2FFktQNcGFPmnOshpANcqFEx7udpEDvQDdiq93W8ryZG4oSfm9D9sp2Aowkhu/1wg8qj4PglnxUFM96DOLgZMd9NVnTByM/ZG1vgkHHCrqwpA/7bO67OjTjo1TLKVL442Lx3sGw==``
+      ``progress``
+        Reading progress in the ranging from 0-1. Type: Float.
+
+        Only for ``bookmark`` (reading position) patches.
+
+        Example: ``0.41666666``
+      ``currentPosition``
+        Current page number. Type: String.
+
+        Only for ``bookmark`` (reading position) patches.
+
+        Example: ``"5"``
+      ``lastPosition``
+        Last page number in the book. Type: String
+
+        Only for ``bookmark`` (reading position) patches.
+
+        Example: ``"12"``
+      ``transientId``
+        FIXME. Type: String.
+
+        Only when ``op=add`` on ``dogears`` (bookmark) and ``comments``.
+
+        Example: ``"3"``
+      ``name``
+        Text on the bookmarked page. Type: String.
+
+        Only for ``dogears`` (bookmark) add+remove operations.
+      ``text``
+        Highlighted text. Type: String
+
+        Only for ``comments`` (highlight/note) add+remove operations.
+      ``startPosition``
+        Start of highlighted text. Type: String.
+
+        Only for ``comments`` (highlight/note) add+remove operations.
+
+        Example: ``OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:463)``
+      ``endPosition``
+        End of highlighted text. Type: String.
+
+        Only for ``comments`` (highlight/note) add+remove operations.
+
+        Example: ``OEBPS/caterina-di-montebasso-das-relikt_0.html#point(/1/2/1/11/1:682)``
+      ``note``
+        Manually entered text (note). Type: String.
+
+        Only for ``comments`` (note) add+remove operations.
+
+        Property does not appear for non-note highlights.
+
+        Example: ``Really?``
+
+
+When closing a book (going back to the book list), the current reading
+position is synchronized to the server - regardless if it changed.
+I removed that from the requests + responses to have cleaner examples.
+
+The ``revision`` in the request is the ``revision`` the server returned
+in the last response.
 
 
 First sync request
@@ -50,11 +155,83 @@ ever has been synchronized:
    :code:
 
 
+Set reading position
+--------------------
+Reading a page in the book and exiting back to the books list:
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.request-reading-position.json
+   :code:
+
+
+
 Response
 ========
 HTTP status code: ``200 OK``
 
-FIXME: document different types and how progress is saved
+When something changed, a new ``revision`` number is returned.
+
+When synchronizing local changes to the server - and the server has no
+changes from other readers,
+the request is mirrored back in the response
+(only the revision number is updated).
+
+The server first ingests the request's patch data into its database,
+and then calculates and returns the changes from the
+requests's ``revision`` number to the current revision.
+Those changes are returned in the response, together with the current
+latest revision number.
+
+Same structure as the request data.
+
+
+Set reading position
+--------------------
+The "Set reading position" changes and a new revision is returned.
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-reading-position.json
+   :code:
+
+
+Set a bookmark
+--------------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-bookmark-set.json
+   :code:
+
+
+Remove a bookmark
+-----------------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-bookmark-remove.json
+   :code:
+
+
+Add a highlight
+---------------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-highlight-add.json
+   :code:
+
+
+Remove a highlight
+------------------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-highlight-remove.json
+   :code:
+
+
+Add a note
+----------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-note-add.json
+   :code:
+
+
+Remove a note
+-------------
+
+.. include:: pageplace.bosh-bosh-rest-sync-data.response-note-remove.json
+   :code:
 
 
 New bookmarks and comments
index fef5b2f26f614b8804fe3f2121e3b1781af9146a..0338b2164e0734e8d9c639585702c983b15c4cca 100644 (file)
@@ -59,5 +59,5 @@ Family members
 --------------
 Example:
 
-.. include:: pageplace.family-v1-shares.response-3books.json
+.. include:: pageplace.family-v1-shares.response-2books.json
    :code:
index ebf13fc96abdc6b241f6ad70bd67d59f5a72564e..ec552ab2769421fb53d2ba21cbabdcc15e074656 100644 (file)
@@ -46,6 +46,8 @@ Header
     Example: ``$Version=1``
 
 GET parameters
+  ``fullResponse``
+    Optional. Values: ``true``
   ``page``
     Example: ``0``
   ``size``