GitHub PullRequestEvent at 2014-06-22 19:05:21
Repository: spotify-web-api-wrapper-php
Actor: Sytanek
Payload: {"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6","id":17450934,"html_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php/pull/6","diff_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php/pull/6.diff","patch_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php/pull/6.patch","issue_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/6","number":6,"state":"open","title":"Update Spotify.php","user":{"login":"Sytanek","id":410768,"avatar_url":"https://avatars.githubusercontent.com/u/410768?","gravatar_id":"e664b608c1f1775c2ed8d5f71347785d","url":"https://api.github.com/users/Sytanek","html_url":"https://github.com/Sytanek","followers_url":"https://api.github.com/users/Sytanek/followers","following_url":"https://api.github.com/users/Sytanek/following{/other_user}","gists_url":"https://api.github.com/users/Sytanek/gists{/gist_id}","starred_url":"https://api.github.com/users/Sytanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sytanek/subscriptions","organizations_url":"https://api.github.com/users/Sytanek/orgs","repos_url":"https://api.github.com/users/Sytanek/repos","events_url":"https://api.github.com/users/Sytanek/events{/privacy}","received_events_url":"https://api.github.com/users/Sytanek/received_events","type":"User","site_admin":false},"body":"getTracksInPlaylist returns a maximum of 100 results. If there are more than 100 results, then you need to specify an offset of the previous offset + 100. Something I have done to mine, which could possibly done here, is to automatically return all results.\r\n\r\n$data['next'] = 'start';\r\nwhile($data['next'] != '')\r\n{\t\t\t\r\n    $data = $this->request('GET', SPOTIFY_API_ENDPOINT, '/users/' . $user . '/playlists/' . $playlist . '/tracks?      offset=' . $offset , 'json', NULL);\r\n    $offset = $offset + 100;\r\n    foreach($data['items'] as $item)\r\n    {\r\n        $collection[] = $item;\r\n    }\r\n}\r\nreturn $collection[];","created_at":"2014-06-22T19:05:20Z","updated_at":"2014-06-22T19:05:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6/commits","review_comments_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6/comments","review_comment_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/6/comments","statuses_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/statuses/c4959c516b494f1eb37f87a2cfad0a4da2e1220c","head":{"label":"Sytanek:patch-7","ref":"patch-7","sha":"c4959c516b494f1eb37f87a2cfad0a4da2e1220c","user":{"login":"Sytanek","id":410768,"avatar_url":"https://avatars.githubusercontent.com/u/410768?","gravatar_id":"e664b608c1f1775c2ed8d5f71347785d","url":"https://api.github.com/users/Sytanek","html_url":"https://github.com/Sytanek","followers_url":"https://api.github.com/users/Sytanek/followers","following_url":"https://api.github.com/users/Sytanek/following{/other_user}","gists_url":"https://api.github.com/users/Sytanek/gists{/gist_id}","starred_url":"https://api.github.com/users/Sytanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sytanek/subscriptions","organizations_url":"https://api.github.com/users/Sytanek/orgs","repos_url":"https://api.github.com/users/Sytanek/repos","events_url":"https://api.github.com/users/Sytanek/events{/privacy}","received_events_url":"https://api.github.com/users/Sytanek/received_events","type":"User","site_admin":false},"repo":{"id":21039596,"name":"spotify-web-api-wrapper-php","full_name":"Sytanek/spotify-web-api-wrapper-php","owner":{"login":"Sytanek","id":410768,"avatar_url":"https://avatars.githubusercontent.com/u/410768?","gravatar_id":"e664b608c1f1775c2ed8d5f71347785d","url":"https://api.github.com/users/Sytanek","html_url":"https://github.com/Sytanek","followers_url":"https://api.github.com/users/Sytanek/followers","following_url":"https://api.github.com/users/Sytanek/following{/other_user}","gists_url":"https://api.github.com/users/Sytanek/gists{/gist_id}","starred_url":"https://api.github.com/users/Sytanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sytanek/subscriptions","organizations_url":"https://api.github.com/users/Sytanek/orgs","repos_url":"https://api.github.com/users/Sytanek/repos","events_url":"https://api.github.com/users/Sytanek/events{/privacy}","received_events_url":"https://api.github.com/users/Sytanek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sytanek/spotify-web-api-wrapper-php","description":"PHP wrapper for the Spotify web API","fork":true,"url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php","forks_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/forks","keys_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/teams","hooks_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/hooks","issue_events_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/issues/events{/number}","events_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/events","assignees_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/assignees{/user}","branches_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/branches{/branch}","tags_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/tags","blobs_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/statuses/{sha}","languages_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/languages","stargazers_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/stargazers","contributors_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/contributors","subscribers_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/subscribers","subscription_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/subscription","commits_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/issues/comments/{number}","contents_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/contents/{+path}","compare_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/merges","archive_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/downloads","issues_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/issues{/number}","pulls_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/pulls{/number}","milestones_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/milestones{/number}","notifications_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/labels{/name}","releases_url":"https://api.github.com/repos/Sytanek/spotify-web-api-wrapper-php/releases{/id}","created_at":"2014-06-20T13:54:55Z","updated_at":"2014-06-22T19:05:21Z","pushed_at":"2014-06-22T19:05:16Z","git_url":"git://github.com/Sytanek/spotify-web-api-wrapper-php.git","ssh_url":"git@github.com:Sytanek/spotify-web-api-wrapper-php.git","clone_url":"https://github.com/Sytanek/spotify-web-api-wrapper-php.git","svn_url":"https://github.com/Sytanek/spotify-web-api-wrapper-php","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ArtistconnectorSweden:master","ref":"master","sha":"f99464ece61b0f4231e4c7c060dbbdf6323aeebd","user":{"login":"ArtistconnectorSweden","id":4279589,"avatar_url":"https://avatars.githubusercontent.com/u/4279589?","gravatar_id":null,"url":"https://api.github.com/users/ArtistconnectorSweden","html_url":"https://github.com/ArtistconnectorSweden","followers_url":"https://api.github.com/users/ArtistconnectorSweden/followers","following_url":"https://api.github.com/users/ArtistconnectorSweden/following{/other_user}","gists_url":"https://api.github.com/users/ArtistconnectorSweden/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtistconnectorSweden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtistconnectorSweden/subscriptions","organizations_url":"https://api.github.com/users/ArtistconnectorSweden/orgs","repos_url":"https://api.github.com/users/ArtistconnectorSweden/repos","events_url":"https://api.github.com/users/ArtistconnectorSweden/events{/privacy}","received_events_url":"https://api.github.com/users/ArtistconnectorSweden/received_events","type":"Organization","site_admin":false},"repo":{"id":20923207,"name":"spotify-web-api-wrapper-php","full_name":"ArtistconnectorSweden/spotify-web-api-wrapper-php","owner":{"login":"ArtistconnectorSweden","id":4279589,"avatar_url":"https://avatars.githubusercontent.com/u/4279589?","gravatar_id":null,"url":"https://api.github.com/users/ArtistconnectorSweden","html_url":"https://github.com/ArtistconnectorSweden","followers_url":"https://api.github.com/users/ArtistconnectorSweden/followers","following_url":"https://api.github.com/users/ArtistconnectorSweden/following{/other_user}","gists_url":"https://api.github.com/users/ArtistconnectorSweden/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtistconnectorSweden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtistconnectorSweden/subscriptions","organizations_url":"https://api.github.com/users/ArtistconnectorSweden/orgs","repos_url":"https://api.github.com/users/ArtistconnectorSweden/repos","events_url":"https://api.github.com/users/ArtistconnectorSweden/events{/privacy}","received_events_url":"https://api.github.com/users/ArtistconnectorSweden/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php","description":"PHP wrapper for the Spotify web API","fork":true,"url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php","forks_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/forks","keys_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/teams","hooks_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/hooks","issue_events_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/events{/number}","events_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/events","assignees_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/assignees{/user}","branches_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/branches{/branch}","tags_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/tags","blobs_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/statuses/{sha}","languages_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/languages","stargazers_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/stargazers","contributors_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/contributors","subscribers_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/subscribers","subscription_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/subscription","commits_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/comments/{number}","contents_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/contents/{+path}","compare_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/merges","archive_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/downloads","issues_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues{/number}","pulls_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls{/number}","milestones_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/milestones{/number}","notifications_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/labels{/name}","releases_url":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/releases{/id}","created_at":"2014-06-17T12:55:30Z","updated_at":"2014-06-22T13:10:24Z","pushed_at":"2014-06-22T13:10:24Z","git_url":"git://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php.git","ssh_url":"git@github.com:ArtistconnectorSweden/spotify-web-api-wrapper-php.git","clone_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php.git","svn_url":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6"},"html":{"href":"https://github.com/ArtistconnectorSweden/spotify-web-api-wrapper-php/pull/6"},"issue":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/6"},"comments":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/ArtistconnectorSweden/spotify-web-api-wrapper-php/statuses/c4959c516b494f1eb37f87a2cfad0a4da2e1220c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}