{"action":"created","comment":{"url":"https://api.github.com/repos/Kinto/kinto-client/pulls/comments/55759009","id":55759009,"diff_hunk":"@@ -372,4 +372,20 @@ export default class KintoClient {\n     return this.execute(requests.deleteBucket(_bucket, reqOptions))\n       .then(res => res.json);\n   }\n+\n+  /**\n+   * Deletes all buckets on the server.\n+   *\n+   * @ignore\n+   * @param  {Object}  options         The options object.\n+   * @param  {Boolean} options.safe    The safe option.\n+   * @param  {Object}  options.headers The headers object option.\n+   * @return {Promise<Object, Error>}\n+   */\n+  @support(\"1.4\", \"2.0\")\n+  deleteBuckets(options={}) {","path":"src/index.js","position":24,"original_position":24,"commit_id":"489f922df08f84d4d793e76aea264884c85b0815","original_commit_id":"489f922df08f84d4d793e76aea264884c85b0815","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":":+1: x 1000","created_at":"2016-03-10T22:13:57Z","updated_at":"2016-03-10T22:13:57Z","html_url":"https://github.com/Kinto/kinto-client/pull/66#discussion_r55759009","pull_request_url":"https://api.github.com/repos/Kinto/kinto-client/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/comments/55759009"},"html":{"href":"https://github.com/Kinto/kinto-client/pull/66#discussion_r55759009"},"pull_request":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto-client/pulls/66","id":62409670,"html_url":"https://github.com/Kinto/kinto-client/pull/66","diff_url":"https://github.com/Kinto/kinto-client/pull/66.diff","patch_url":"https://github.com/Kinto/kinto-client/pull/66.patch","issue_url":"https://api.github.com/repos/Kinto/kinto-client/issues/66","number":66,"state":"open","locked":false,"title":"Fixes #62: Check for http_api_version compatibility.","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":"This is WiP, refs #62.\r\n\r\nThe patch introduces a `ensureSupported` method at the client level we can leverage to conditionally execute a function depending of HTTP API version requirements.\r\n\r\nThis also adds `KintoClient#deleteBuckets()` which is provided by the Kinto protocol v1.4 only, and conditional integration tests for it. \r\n\r\nFeedback=? @almet @Natim @leplatrem @magopian \r\n\r\nPS: Discarded using ES7 decorators. I really wish decorated methods could access their related instance state, though we're only passed the class itself, which is pointless except if you want to attach static properties to it (which you don't). Also, fought too hard with Babel to be confident using them securely.\r\n\r\nEdit: Finally managed to use ES7 decorators. Much better.","created_at":"2016-03-10T15:49:06Z","updated_at":"2016-03-10T22:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1b0770755f76edec91947f60a0741e2193bf999","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Kinto/kinto-client/pulls/66/commits","review_comments_url":"https://api.github.com/repos/Kinto/kinto-client/pulls/66/comments","review_comment_url":"https://api.github.com/repos/Kinto/kinto-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kinto/kinto-client/issues/66/comments","statuses_url":"https://api.github.com/repos/Kinto/kinto-client/statuses/489f922df08f84d4d793e76aea264884c85b0815","head":{"label":"Kinto:support-checks","ref":"support-checks","sha":"489f922df08f84d4d793e76aea264884c85b0815","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":51152385,"name":"kinto-client","full_name":"Kinto/kinto-client","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto-client","description":"A JavaScript HTTP client for the Kinto API.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto-client","forks_url":"https://api.github.com/repos/Kinto/kinto-client/forks","keys_url":"https://api.github.com/repos/Kinto/kinto-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto-client/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto-client/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto-client/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto-client/events","assignees_url":"https://api.github.com/repos/Kinto/kinto-client/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto-client/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto-client/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto-client/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto-client/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto-client/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto-client/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto-client/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto-client/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto-client/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto-client/merges","archive_url":"https://api.github.com/repos/Kinto/kinto-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto-client/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto-client/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto-client/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto-client/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto-client/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto-client/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto-client/deployments","created_at":"2016-02-05T14:49:10Z","updated_at":"2016-03-02T23:32:32Z","pushed_at":"2016-03-10T22:10:34Z","git_url":"git://github.com/Kinto/kinto-client.git","ssh_url":"git@github.com:Kinto/kinto-client.git","clone_url":"https://github.com/Kinto/kinto-client.git","svn_url":"https://github.com/Kinto/kinto-client","homepage":"https://doc.esdoc.org/github.com/Kinto/kinto-client/","size":204,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":1,"default_branch":"master"}},"base":{"label":"Kinto:master","ref":"master","sha":"78317ebbf80a1c05f54af4927631f61b90fefd59","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":51152385,"name":"kinto-client","full_name":"Kinto/kinto-client","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto-client","description":"A JavaScript HTTP client for the Kinto API.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto-client","forks_url":"https://api.github.com/repos/Kinto/kinto-client/forks","keys_url":"https://api.github.com/repos/Kinto/kinto-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto-client/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto-client/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto-client/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto-client/events","assignees_url":"https://api.github.com/repos/Kinto/kinto-client/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto-client/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto-client/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto-client/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto-client/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto-client/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto-client/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto-client/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto-client/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto-client/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto-client/merges","archive_url":"https://api.github.com/repos/Kinto/kinto-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto-client/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto-client/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto-client/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto-client/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto-client/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto-client/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto-client/deployments","created_at":"2016-02-05T14:49:10Z","updated_at":"2016-03-02T23:32:32Z","pushed_at":"2016-03-10T22:10:34Z","git_url":"git://github.com/Kinto/kinto-client.git","ssh_url":"git@github.com:Kinto/kinto-client.git","clone_url":"https://github.com/Kinto/kinto-client.git","svn_url":"https://github.com/Kinto/kinto-client","homepage":"https://doc.esdoc.org/github.com/Kinto/kinto-client/","size":204,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/66"},"html":{"href":"https://github.com/Kinto/kinto-client/pull/66"},"issue":{"href":"https://api.github.com/repos/Kinto/kinto-client/issues/66"},"comments":{"href":"https://api.github.com/repos/Kinto/kinto-client/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kinto/kinto-client/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/Kinto/kinto-client/statuses/489f922df08f84d4d793e76aea264884c85b0815"}}}}