{"action":"created","comment":{"url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/comments/61572662","id":61572662,"diff_hunk":"@@ -169,8 +169,6 @@ class Rest\n \n   # Public: Fetch all results of a Sphere resource query endpoint in batches of pages using a recursive function.\n   #\n-  # Note that traversing with pagination has been optimized. It now fetches pages sorted by `id` and iterates\n-  # using a query with the `id` greater then the last one of the previous page.","path":"src/coffee/connect/rest.coffee","position":5,"original_position":5,"commit_id":"4a65f70b4a75e1690b01ad00f20ac2f147e81edd","original_commit_id":"5d8d4dd1b91e7a6bb0ab01d2523b1300904656c2","user":{"login":"PhilippSpo","id":8394418,"avatar_url":"https://avatars.githubusercontent.com/u/8394418?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilippSpo","html_url":"https://github.com/PhilippSpo","followers_url":"https://api.github.com/users/PhilippSpo/followers","following_url":"https://api.github.com/users/PhilippSpo/following{/other_user}","gists_url":"https://api.github.com/users/PhilippSpo/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilippSpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilippSpo/subscriptions","organizations_url":"https://api.github.com/users/PhilippSpo/orgs","repos_url":"https://api.github.com/users/PhilippSpo/repos","events_url":"https://api.github.com/users/PhilippSpo/events{/privacy}","received_events_url":"https://api.github.com/users/PhilippSpo/received_events","type":"User","site_admin":false},"body":"Well .. the default sorting is not done here, but in `fetch`. So the `PAGED` method is unaware of any sorting right now. Should we maybe write that in order for the `PAGED` request to work correctly, you should provide a sorting?","created_at":"2016-04-29T13:00:10Z","updated_at":"2016-04-29T13:00:10Z","html_url":"https://github.com/sphereio/sphere-node-sdk/pull/124#discussion_r61572662","pull_request_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124","_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/comments/61572662"},"html":{"href":"https://github.com/sphereio/sphere-node-sdk/pull/124#discussion_r61572662"},"pull_request":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124","id":68362111,"html_url":"https://github.com/sphereio/sphere-node-sdk/pull/124","diff_url":"https://github.com/sphereio/sphere-node-sdk/pull/124.diff","patch_url":"https://github.com/sphereio/sphere-node-sdk/pull/124.patch","issue_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/124","number":124,"state":"open","locked":false,"title":"refactor(rest): prevent overwriting of sort when using all()","user":{"login":"PhilippSpo","id":8394418,"avatar_url":"https://avatars.githubusercontent.com/u/8394418?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilippSpo","html_url":"https://github.com/PhilippSpo","followers_url":"https://api.github.com/users/PhilippSpo/followers","following_url":"https://api.github.com/users/PhilippSpo/following{/other_user}","gists_url":"https://api.github.com/users/PhilippSpo/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilippSpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilippSpo/subscriptions","organizations_url":"https://api.github.com/users/PhilippSpo/orgs","repos_url":"https://api.github.com/users/PhilippSpo/repos","events_url":"https://api.github.com/users/PhilippSpo/events{/privacy}","received_events_url":"https://api.github.com/users/PhilippSpo/received_events","type":"User","site_admin":false},"body":"- [x] commit messages are commitizen-friendly\r\n- [x] code is unit tested\r\n- [x] public code is documented\r\n- [ ] code is reviewed by at least one person\r\n- [x] code satisfies linter rules\r\n\r\nNow you are able to provide your own sorting when doing `all()`. If you don't provide any sorting it\r\nwill still sort by id by default.\r\n\r\ncloses #122\r\n\r\ncc @emmenko ","created_at":"2016-04-29T12:11:23Z","updated_at":"2016-04-29T13:00:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f059ee52fcb0cab1794eedaeef535a74937b25ae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124/commits","review_comments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124/comments","review_comment_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/124/comments","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/statuses/4a65f70b4a75e1690b01ad00f20ac2f147e81edd","head":{"label":"sphereio:remove-standard-sorting-for-paged","ref":"remove-standard-sorting-for-paged","sha":"4a65f70b4a75e1690b01ad00f20ac2f147e81edd","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":16157638,"name":"sphere-node-sdk","full_name":"sphereio/sphere-node-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-node-sdk","description":"Officially supported Node.js SDK library for working with the SPHERE.IO HTTP API, with OAuth2 support.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-node-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/deployments","created_at":"2014-01-23T00:45:57Z","updated_at":"2016-02-01T14:53:05Z","pushed_at":"2016-04-29T12:57:54Z","git_url":"git://github.com/sphereio/sphere-node-sdk.git","ssh_url":"git@github.com:sphereio/sphere-node-sdk.git","clone_url":"https://github.com/sphereio/sphere-node-sdk.git","svn_url":"https://github.com/sphereio/sphere-node-sdk","homepage":"http://sphereio.github.io/sphere-node-sdk/","size":1065,"stargazers_count":9,"watchers_count":9,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":18,"forks":5,"open_issues":18,"watchers":9,"default_branch":"master"}},"base":{"label":"sphereio:master","ref":"master","sha":"315239002a64c420846a6db5a6f03f54d7423896","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":16157638,"name":"sphere-node-sdk","full_name":"sphereio/sphere-node-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-node-sdk","description":"Officially supported Node.js SDK library for working with the SPHERE.IO HTTP API, with OAuth2 support.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-node-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/deployments","created_at":"2014-01-23T00:45:57Z","updated_at":"2016-02-01T14:53:05Z","pushed_at":"2016-04-29T12:57:54Z","git_url":"git://github.com/sphereio/sphere-node-sdk.git","ssh_url":"git@github.com:sphereio/sphere-node-sdk.git","clone_url":"https://github.com/sphereio/sphere-node-sdk.git","svn_url":"https://github.com/sphereio/sphere-node-sdk","homepage":"http://sphereio.github.io/sphere-node-sdk/","size":1065,"stargazers_count":9,"watchers_count":9,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":18,"forks":5,"open_issues":18,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124"},"html":{"href":"https://github.com/sphereio/sphere-node-sdk/pull/124"},"issue":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/124"},"comments":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/sphereio/sphere-node-sdk/statuses/4a65f70b4a75e1690b01ad00f20ac2f147e81edd"}}}}