Skip to content
Permalink
Browse files

To prevent update conflicts, lastUpdated payload value is now checked…

… against existing sync.

Minor updates to docs.
Added plugin to enable TypeScript linting in VSCode.
  • Loading branch information...
nero120 committed Jun 14, 2019
1 parent bdbec6a commit 819c181b98633fa4dad722ebdfe1e75b4e1f9552

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -1,22 +1,23 @@
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8 /> <meta name=viewport content="width=device-width,initial-scale=1"/> <meta name=robots content=noindex /> <title>xBrowserSync API</title> <link rel=icon type=image/png href=./icon-128.png sizes=128x128> <link href="styles.css" rel="stylesheet"></head> <body id=home class=index> <div class=bg-main> <div class=bg-main-img></div> </div> <button type=button class=nav-menu-button> <span class=hamburger aria-hidden=true></span> <span class=sr-only>Menu</span> </button> <nav id=mainNav class="navbar navbar-expand-md navbar-default navbar-fixed-top navbar-custom affix"> <div class=container> <div class="collapse navbar-collapse" id=navbar> <ul class=navbar-nav> <li class=nav-item> <a class=nav-link href=#home>Home</a> </li> <li class=nav-item> <a class=nav-link href=#status>Status</a> </li> <li class=nav-item> <a class=nav-link href=#bookmarks>Bookmarks</a> </li> <li class=nav-item> <a class=nav-link href=#serviceinfo>Service Information</a> </li> </ul> </div> </div> </nav> <header> <div class=container> <div class=row> <div class="col-md-4 offset-md-2"> <h1>xBrowserSync</h1> </div> <div class="title col-md-6"> <h2>API service info</h2> </div> </div> </div> </header> <section id=status class=dark> <div class=container> <div class=row> <div class="serviceinfo col-lg-8 offset-lg-2"> <span> <strong>Status:</strong> <span id=currentstatus></span> </span> <span> <strong>Version:</strong> <span id=version></span> </span> </div> <div class="col-lg-8 offset-lg-2"> <p id=servermessage></p> </div> </div> <div class=row> <div class="col-lg-8 offset-lg-2"> <p>This xBrowserSync service provides a REST API that xBrowserSync clients can sync to. The available API methods are listed below.</p> <p>For more information visit the <a href=https://www.xbrowsersync.org/ >xBrowserSync website</a> or check out the <a href=https://github.com/xbrowsersync/api>API GitHub repo</a>.</p> </div> </div> </div> </section> <section id=bookmarks> <div class=container> <div class=panel> <h3>Bookmarks</h3> <div class=header> <h4>Create Bookmarks</h4> <div> <span class="label label-warning">Post</span> <code>/bookmarks</code> </div> </div> <p>Creates a new (empty) bookmark sync and returns the corresponding ID.</p> <div class=example> <p>Post body example:</p> <pre><code>{
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8 /> <meta name=viewport content="width=device-width,initial-scale=1"/> <meta name=robots content=noindex /> <title>xBrowserSync API</title> <link rel=icon type=image/png href=./icon-128.png sizes=128x128> <link href="styles.css" rel="stylesheet"></head> <body id=home class=index> <div class=bg-main> <div class=bg-main-img></div> </div> <button type=button class=nav-menu-button> <span class=hamburger aria-hidden=true></span> <span class=sr-only>Menu</span> </button> <nav id=mainNav class="navbar navbar-expand-md navbar-default navbar-fixed-top navbar-custom affix"> <div class=container> <div class="collapse navbar-collapse" id=navbar> <ul class=navbar-nav> <li class=nav-item> <a class=nav-link href=#home>Home</a> </li> <li class=nav-item> <a class=nav-link href=#status>Status</a> </li> <li class=nav-item> <a class=nav-link href=#bookmarks>Bookmarks</a> </li> <li class=nav-item> <a class=nav-link href=#serviceinfo>Service Information</a> </li> </ul> </div> </div> </nav> <header> <div class=container> <div class=row> <div class="col-md-4 offset-md-2"> <h1>xBrowserSync</h1> </div> <div class="title col-md-6"> <h2>API service info</h2> </div> </div> </div> </header> <section id=status class=dark> <div class=container> <div class=row> <div class="serviceinfo col-lg-8 offset-lg-2"> <span> <strong>Status:</strong> <span id=currentstatus></span> </span> <span> <strong>Version:</strong> <span id=version></span> </span> </div> <div class="col-lg-8 offset-lg-2"> <p id=servermessage></p> </div> </div> <div class=row> <div class="col-lg-8 offset-lg-2"> <p>This xBrowserSync service provides a REST API that xBrowserSync clients can sync to. The available API methods are listed below.</p> <p>For more information visit the <a href=https://www.xbrowsersync.org/ >xBrowserSync website</a> or check out the <a href=https://github.com/xbrowsersync/api>API GitHub repo</a>.</p> </div> </div> </div> </section> <section id=bookmarks> <div class=container> <div class=panel> <h3>Bookmarks</h3> <div class=header> <h4>Create bookmarks</h4> <div> <span class="label label-warning">Post</span> <code>/bookmarks</code> </div> </div> <p>Creates a new (empty) bookmark sync and returns the corresponding ID.</p> <div class=example> <p>Post body example:</p> <pre><code>{
"version":"1.0.0"
}</code></pre> <ul> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> <p>Response example:</p> <pre><code>{
"id":"52758cb942814faa9ab255208025ae59",
"lastUpdated":"2016-07-06T12:43:16.866Z",
"version":"1.0.0"
}</code></pre> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> <li> <strong>lastUpdated:</strong> Last updated timestamp for created bookmarks.</li> <li> <strong>version:</strong>Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> <div class=header> <h4>Get Bookmarks</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}</code> </div> </div> <p>Retrieves the bookmark sync corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
}</code></pre> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> <li> <strong>lastUpdated:</strong> Last updated timestamp for created bookmarks.</li> <li> <strong>version:</strong>Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> <div class=header> <h4>Get bookmarks</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}</code> </div> </div> <p>Retrieves the bookmark sync corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
"bookmarks":"DWCx6wR9ggPqPRrhU4O4oLN5P09oULX4Xt+ckxswtFNds...",
"lastUpdated":"2016-07-06T12:43:16.866Z",
"version":"1.0.0"
}</code></pre> <ul> <li> <strong>bookmarks:</strong> Encrypted bookmark data salted using secret value.</li> <li> <strong>lastUpdated:</strong> Last updated timestamp for retrieved bookmarks.</li> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> <div class=header> <h4>Update Bookmarks</h4> <div> <span class="label label-info">Put</span> <code>/bookmarks/{id}</code> </div> </div> <p>Updates the bookmark sync data corresponding to the provided sync ID with the provided encrypted bookmarks data.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Post body example:</p> <pre><code>{
"bookmarks":"DWCx6wR9ggPqPRrhU4O4oLN5P09oULX4Xt+ckxswtFNds..."
}</code></pre> <ul> <li> <strong>bookmarks:</strong> Encrypted bookmark data salted using secret value.</li> </ul> <p>Response example:</p> <pre><code>{
}</code></pre> <ul> <li> <strong>bookmarks:</strong> Encrypted bookmark data salted using secret value.</li> <li> <strong>lastUpdated:</strong> Last updated timestamp for retrieved bookmarks.</li> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> <div class=header> <h4>Update bookmarks</h4> <div> <span class="label label-info">Put</span> <code>/bookmarks/{id}</code> </div> </div> <p>Updates the bookmark sync data corresponding to the provided sync ID with the provided encrypted bookmarks data.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Post body example:</p> <pre><code>{
"bookmarks":"DWCx6wR9ggPqPRrhU4O4oLN5P09oULX4Xt+ckxswtFNds...",
"lastUpdated":"2016-07-06T12:43:16.866Z",
}</code></pre> <ul> <li> <strong>bookmarks:</strong> Encrypted bookmark data salted using secret value.</li> <li> <strong>lastUpdated:</strong> Last updated timestamp to check against existing bookmarks.</li> </ul> <p>Response example:</p> <pre><code>{
"lastUpdated":"2016-07-06T12:43:16.866Z"
}</code></pre> <ul> <li> <strong>lastUpdated:</strong> Last updated timestamp for updated bookmarks.</li> </ul> </div> <div class=header> <h4>Get Last Updated</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}/lastUpdated</code> </div> </div> <p>Retrieves the bookmark sync last updated time stamp corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
}</code></pre> <ul> <li> <strong>lastUpdated:</strong> Last updated timestamp for updated bookmarks.</li> </ul> </div> <div class=header> <h4>Get last updated</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}/lastUpdated</code> </div> </div> <p>Retrieves the bookmark sync last updated timestamp corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
"lastUpdated":"2016-07-06T12:43:16.866Z"
}</code></pre> <ul> <li> <strong>lastUpdated:</strong> Last updated timestamp for corresponding bookmarks.</li> </ul> </div> <div class=header> <h4>Get Sync Version</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}/version</code> </div> </div> <p>Retrieves the bookmark sync version number of the xBrowserSync client used to create the bookmarks sync corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
}</code></pre> <ul> <li> <strong>lastUpdated:</strong> Last updated timestamp for corresponding bookmarks.</li> </ul> </div> <div class=header> <h4>Get sync version</h4> <div> <span class="label label-success">Get</span> <code>/bookmarks/{id}/version</code> </div> </div> <p>Retrieves the bookmark sync version number of the xBrowserSync client used to create the bookmarks sync corresponding to the provided sync ID.</p> <div class=example> <p>Query params:</p> <ul> <li> <strong>id:</strong> 32 character alphanumeric sync ID.</li> </ul> <p>Response example:</p> <pre><code>{
"version":"1.0.0"
}</code></pre> <ul> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> </div> </div> </section> <section id=serviceinfo> <div class=container> <div class=panel> <h3>Service Information</h3> <div class=header> <h4>Get Service Information</h4> <div> <span class="label label-success">Get</span> <code>/info</code> </div> </div> <p>Retrieves information describing the xBrowserSync service.</p> <div class=example> <p>Response example:</p> <pre><code>{
}</code></pre> <ul> <li> <strong>version:</strong> Version number of the xBrowserSync client used to create the sync.</li> </ul> </div> </div> </div> </section> <section id=serviceinfo> <div class=container> <div class=panel> <h3>Service information</h3> <div class=header> <h4>Get service information</h4> <div> <span class="label label-success">Get</span> <code>/info</code> </div> </div> <p>Retrieves information describing the xBrowserSync service.</p> <div class=example> <p>Response example:</p> <pre><code>{
"maxSyncSize":204800,
"message":"",
"status":1,

Some generated files are not rendered by default. Learn more.

0 comments on commit 819c181

Please sign in to comment.
You can’t perform that action at this time.