{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments/30980786","id":30980786,"diff_hunk":"@@ -1,20 +1,262 @@\n-Cliquetis\n-=========\n+# Cliquetis\n \n [![Build Status](https://travis-ci.org/mozilla-services/cliquetis.svg?branch=master)](https://travis-ci.org/mozilla-services/cliquetis)\n \n A JavaScript client for [Cliquet](https://github.com/mozilla-services/cliquet/).\n \n-Installation\n-------------\n+This is work in progress, there's no code just yet.\n+\n+## Installation\n \n     $ npm install\n \n-Build\n------\n+## Build\n \n     $ npm run dist\n \n+## Usage\n+\n+**Caution: everything in this section is still pure fiction.**\n+\n+* Every operation is performed locally;\n+* Synchronization with server shall be ran explicitly.\n+\n+### The `Cliquetis` constructor\n+\n+```js\n+var db = new Cliquetis(options);\n+```\n+\n+`options` is an object defining the following option values:\n+\n+- `remote`: The remote Cliquet server endpoint root URL (eg. `\"https://server/v1\"`);\n+- `headers`: The default headers to pass for every HTTP request performed to the Cliquet server (eg. `{\"Authorization\": \"Basic bWF0Og==\"}`);","path":"README.md","position":39,"original_position":39,"commit_id":"05da2fb43df2be0fc19f44146033bf1f181c9b37","original_commit_id":"05da2fb43df2be0fc19f44146033bf1f181c9b37","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars.githubusercontent.com/u/546692?v=3","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"I find this pretty flexible though","created_at":"2015-05-25T13:53:30Z","updated_at":"2015-05-25T13:53:30Z","html_url":"https://github.com/mozilla-services/cliquetis/pull/1#discussion_r30980786","pull_request_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/comments/30980786"},"html":{"href":"https://github.com/mozilla-services/cliquetis/pull/1#discussion_r30980786"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1","id":35956075,"html_url":"https://github.com/mozilla-services/cliquetis/pull/1","diff_url":"https://github.com/mozilla-services/cliquetis/pull/1.diff","patch_url":"https://github.com/mozilla-services/cliquetis/pull/1.patch","issue_url":"https://api.github.com/repos/mozilla-services/cliquetis/issues/1","number":1,"state":"closed","locked":false,"title":"Draft dreamcode in README","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars.githubusercontent.com/u/546692?v=3","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"First version imported from collaborative pad.\r\n\r\n* Everything could be rewritten without pity;\r\n* Synchronization strategy is definitely naive so far (our use cases are too);\r\n\r\nPlease review:\r\n* [ ] Shape and wording\r\n* [ ] Weird ideas like URL placeholder etc.\r\n* [ ] Sync approach and strategy;\r\n* [ ] Markdown formatting for API docs, snippets and notes.\r\n\r\n\r\nExample of code that implemented another strategy to sync records with *Cliquet*:\r\n* https://github.com/mozilla-services/readinglist/wiki/Client-phases\r\n* https://hg.mozilla.org/releases/mozilla-aurora/file/18286de4be87/browser/components/readinglist/Sync.jsm\r\n\r\nSynchronization using ETags:\r\n* https://unhosted.org/practice/28/Synchronizing-browser-storage-with-server-storage.html","created_at":"2015-05-21T17:09:52Z","updated_at":"2015-05-25T13:53:30Z","closed_at":"2015-05-22T16:17:23Z","merged_at":"2015-05-22T16:17:23Z","merge_commit_sha":"9aa58a75c433231aa815a06fa01961bedd8b5c4e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1/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/1/comments","statuses_url":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/05da2fb43df2be0fc19f44146033bf1f181c9b37","head":{"label":"mozilla-services:draft-readme","ref":"draft-readme","sha":"05da2fb43df2be0fc19f44146033bf1f181c9b37","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.","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-05-21T08:01:42Z","pushed_at":"2015-05-22T16:17:25Z","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":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"ce8b0a53c2b5dab86b01b1106d3137f4c227807c","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.","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-05-21T08:01:42Z","pushed_at":"2015-05-22T16:17:25Z","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":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1"},"html":{"href":"https://github.com/mozilla-services/cliquetis/pull/1"},"issue":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/issues/1"},"comments":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/pulls/1/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/1/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/cliquetis/statuses/05da2fb43df2be0fc19f44146033bf1f181c9b37"}}}}