{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments/32524962","id":32524962,"diff_hunk":"@@ -0,0 +1,161 @@\n+<!DOCTYPE html>\n+<html>\n+<head>\n+  <meta charset=\"utf-8\">\n+  <title>Cliquetis demo</title>\n+  <style>\n+  .log {\n+    position: fixed;\n+    top: 0;\n+    right: 0;\n+    width: 50%;\n+    height: 100%;\n+    padding: .4em;\n+    font-size: .8em;\n+    color: white;\n+  }\n+  </style>\n+</head>\n+<body>\n+  <h1>Todo list</h1>\n+  <p>Last modified: <span id=\"lastModified\"></span></p>\n+  <ul id=\"todo\"></ul>\n+  <form>\n+    <p>\n+      <input type=\"text\" name=\"label\" placeholder=\"Thing\">\n+      <input type=\"submit\" value=\"Add\">\n+    </p>\n+  </form>\n+  <p>\n+    <input type=\"button\" id=\"clearCompletedBtn\" value=\"Clear completed\">\n+    <input type=\"reset\" id=\"clearAllBtn\" value=\"Clear collection\">\n+    <input type=\"button\" id=\"syncBtn\" value=\"Synchronize collection\">\n+  </p>\n+  <p>\n+    <textarea id=\"log\" class=\"log\"></textarea>\n+  </p>\n+  <script src=\"../dist/cliquetis.js\"></script>\n+  <script>\n+  function main() {\n+    const db = new Cliquetis({remote: \"http://0.0.0.0:8888/v0\"});","path":"demo/index.html","position":40,"original_position":40,"commit_id":"d574a7020983ac36872f1d3153b5d06ccba62107","original_commit_id":"d574a7020983ac36872f1d3153b5d06ccba62107","user":{"login":"ametaireau","id":67073,"avatar_url":"https://avatars.githubusercontent.com/u/67073?v=3","gravatar_id":"","url":"https://api.github.com/users/ametaireau","html_url":"https://github.com/ametaireau","followers_url":"https://api.github.com/users/ametaireau/followers","following_url":"https://api.github.com/users/ametaireau/following{/other_user}","gists_url":"https://api.github.com/users/ametaireau/gists{/gist_id}","starred_url":"https://api.github.com/users/ametaireau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ametaireau/subscriptions","organizations_url":"https://api.github.com/users/ametaireau/orgs","repos_url":"https://api.github.com/users/ametaireau/repos","events_url":"https://api.github.com/users/ametaireau/events{/privacy}","received_events_url":"https://api.github.com/users/ametaireau/received_events","type":"User","site_admin":false},"body":"One cliquetis client should be tied to one major version of cliquet at one particular point in time. As such, it's not possible to have one version of cliquet specifying a different version than what it's able to handle, otherwise unexpected behaviours will happen.\r\n\r\nFor instance, with the upcoming changes in Cliquet, changing the version in cliquetis will not arrange anything, the client code needs to be updated, and then it will not be compatible with the old version of the APIs.","created_at":"2015-06-16T14:18:48Z","updated_at":"2015-06-16T14:18:48Z","html_url":"https://github.com/mozilla-services/cliquetis/pull/7#discussion_r32524962","pull_request_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments/32524962"},"html":{"href":"https://github.com/mozilla-services/cliquetis/pull/7#discussion_r32524962"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7","id":36614863,"html_url":"https://github.com/mozilla-services/cliquetis/pull/7","diff_url":"https://github.com/mozilla-services/cliquetis/pull/7.diff","patch_url":"https://github.com/mozilla-services/cliquetis/pull/7.patch","issue_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/7","number":7,"state":"open","locked":false,"title":"[Ready for Review] First sync() implementation.","user":{"login":"n1k0","id":41547,"avatar_url":"https://avatars.githubusercontent.com/u/41547?v=3","gravatar_id":"","url":"https://api.github.com/users/n1k0","html_url":"https://github.com/n1k0","followers_url":"https://api.github.com/users/n1k0/followers","following_url":"https://api.github.com/users/n1k0/following{/other_user}","gists_url":"https://api.github.com/users/n1k0/gists{/gist_id}","starred_url":"https://api.github.com/users/n1k0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1k0/subscriptions","organizations_url":"https://api.github.com/users/n1k0/orgs","repos_url":"https://api.github.com/users/n1k0/repos","events_url":"https://api.github.com/users/n1k0/events{/privacy}","received_events_url":"https://api.github.com/users/n1k0/received_events","type":"User","site_admin":false},"body":"Early feedback is welcome.\r\n\r\nTODO:\r\n- [x] Avoid rejecting with conflicting sync results, rather resolve with a boolean flag set, eg. `ok: false`.\r\n- [x] Update docs\r\n\r\n**Edit:** This is now in a state I can ask for review. Please concentrate on the sync flow and the public API rather than nitpicking/CS for now (thanks!).\r\n\r\nr=? @leplatrem @ametaireau @Natim ","created_at":"2015-06-01T10:12:14Z","updated_at":"2015-06-16T14:18:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1aea9959aeb6b61e0066022bc8b0ee57a1889125","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/7/comments","statuses_url":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/d574a7020983ac36872f1d3153b5d06ccba62107","head":{"label":"mozilla-services:first-sync-impl","ref":"first-sync-impl","sha":"d574a7020983ac36872f1d3153b5d06ccba62107","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":35978199,"name":"cliquetis","full_name":"mozilla-services/cliquetis","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/cliquetis","description":"A JavaScript client for Cliquet and Kinto.","fork":false,"url":"https://api.github.com/repos/mozilla-services/cliquetis","forks_url":"https://api.github.com/repos/mozilla-services/cliquetis/forks","keys_url":"https://api.github.com/repos/mozilla-services/cliquetis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/cliquetis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/cliquetis/teams","hooks_url":"https://api.github.com/repos/mozilla-services/cliquetis/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/cliquetis/events","assignees_url":"https://api.github.com/repos/mozilla-services/cliquetis/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/cliquetis/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/cliquetis/tags","blobs_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/cliquetis/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/cliquetis/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/cliquetis/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/cliquetis/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/cliquetis/subscription","commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/cliquetis/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/cliquetis/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/cliquetis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/cliquetis/merges","archive_url":"https://api.github.com/repos/mozilla-services/cliquetis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/cliquetis/downloads","issues_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/cliquetis/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/cliquetis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/cliquetis/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/cliquetis/releases{/id}","created_at":"2015-05-20T22:46:31Z","updated_at":"2015-06-05T15:40:34Z","pushed_at":"2015-06-16T12:38:04Z","git_url":"git://github.com/mozilla-services/cliquetis.git","ssh_url":"git@github.com:mozilla-services/cliquetis.git","clone_url":"https://github.com/mozilla-services/cliquetis.git","svn_url":"https://github.com/mozilla-services/cliquetis","homepage":"","size":522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"c46417391b40450f7232be11b9cdbf08236f246a","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":35978199,"name":"cliquetis","full_name":"mozilla-services/cliquetis","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/cliquetis","description":"A JavaScript client for Cliquet and Kinto.","fork":false,"url":"https://api.github.com/repos/mozilla-services/cliquetis","forks_url":"https://api.github.com/repos/mozilla-services/cliquetis/forks","keys_url":"https://api.github.com/repos/mozilla-services/cliquetis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/cliquetis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/cliquetis/teams","hooks_url":"https://api.github.com/repos/mozilla-services/cliquetis/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/cliquetis/events","assignees_url":"https://api.github.com/repos/mozilla-services/cliquetis/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/cliquetis/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/cliquetis/tags","blobs_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/cliquetis/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/cliquetis/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/cliquetis/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/cliquetis/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/cliquetis/subscription","commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/cliquetis/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/cliquetis/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/cliquetis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/cliquetis/merges","archive_url":"https://api.github.com/repos/mozilla-services/cliquetis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/cliquetis/downloads","issues_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/cliquetis/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/cliquetis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/cliquetis/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/cliquetis/releases{/id}","created_at":"2015-05-20T22:46:31Z","updated_at":"2015-06-05T15:40:34Z","pushed_at":"2015-06-16T12:38:04Z","git_url":"git://github.com/mozilla-services/cliquetis.git","ssh_url":"git@github.com:mozilla-services/cliquetis.git","clone_url":"https://github.com/mozilla-services/cliquetis.git","svn_url":"https://github.com/mozilla-services/cliquetis","homepage":"","size":522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7"},"html":{"href":"https://github.com/mozilla-services/cliquetis/pull/7"},"issue":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/issues/7"},"comments":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/d574a7020983ac36872f1d3153b5d06ccba62107"}}}}