{"action":"closed","number":120,"pull_request":{"url":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120","id":63474854,"html_url":"https://github.com/pulviscriptor/agario-client/pull/120","diff_url":"https://github.com/pulviscriptor/agario-client/pull/120.diff","patch_url":"https://github.com/pulviscriptor/agario-client/pull/120.patch","issue_url":"https://api.github.com/repos/pulviscriptor/agario-client/issues/120","number":120,"state":"closed","locked":false,"title":"Update leaderboard logic to match current server behavior.","user":{"login":"kosak","id":720660,"avatar_url":"https://avatars.githubusercontent.com/u/720660?v=3","gravatar_id":"","url":"https://api.github.com/users/kosak","html_url":"https://github.com/kosak","followers_url":"https://api.github.com/users/kosak/followers","following_url":"https://api.github.com/users/kosak/following{/other_user}","gists_url":"https://api.github.com/users/kosak/gists{/gist_id}","starred_url":"https://api.github.com/users/kosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosak/subscriptions","organizations_url":"https://api.github.com/users/kosak/orgs","repos_url":"https://api.github.com/users/kosak/repos","events_url":"https://api.github.com/users/kosak/events{/privacy}","received_events_url":"https://api.github.com/users/kosak/received_events","type":"User","site_admin":false},"body":"From what I have seen, the leaderboard update message has apparently changed since the time this code was written.\r\n\r\nThe server doesn't send blob ids any more. Instead it sends a \"boolean\" 0 or 1 indicating whether you are on the leaderboard or not. The standard agar.io client uses this to decide whether your entry should be highlighted.\r\n\r\nBecause the callback function no longer gets ball ids (and thus can't derive name from ball id), I've added two more arguments to the callback function. Changing the signature is OK (in my opinion) because all such callbacks stopped working properly anyway, as of the time of the server change.\r\n\r\n**TESTING:**\r\n\r\nPrior to this change, the program ```examples/basic.js``` printed nonsensical leaderboard information like this:\r\n\r\nworker: leaders on server: Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя, Ward♣Ðangзя\r\n\r\nAfter this change, it prints leaderboard information like this:\r\n\r\nworker: leaders on server: SAS, CELLulitis, MASTER, , , ee, , JUMBO, marcel B, ArcadePro","created_at":"2016-03-19T18:26:57Z","updated_at":"2016-03-19T19:32:36Z","closed_at":"2016-03-19T19:32:36Z","merged_at":"2016-03-19T19:32:36Z","merge_commit_sha":"02ca4c37689971912304592400ced9897642b141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120/commits","review_comments_url":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120/comments","review_comment_url":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulviscriptor/agario-client/issues/120/comments","statuses_url":"https://api.github.com/repos/pulviscriptor/agario-client/statuses/b7fb7adb04ed2e75646adbc1c19db40b4e521f61","head":{"label":"kosak:leaderboard-logic","ref":"leaderboard-logic","sha":"b7fb7adb04ed2e75646adbc1c19db40b4e521f61","user":{"login":"kosak","id":720660,"avatar_url":"https://avatars.githubusercontent.com/u/720660?v=3","gravatar_id":"","url":"https://api.github.com/users/kosak","html_url":"https://github.com/kosak","followers_url":"https://api.github.com/users/kosak/followers","following_url":"https://api.github.com/users/kosak/following{/other_user}","gists_url":"https://api.github.com/users/kosak/gists{/gist_id}","starred_url":"https://api.github.com/users/kosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosak/subscriptions","organizations_url":"https://api.github.com/users/kosak/orgs","repos_url":"https://api.github.com/users/kosak/repos","events_url":"https://api.github.com/users/kosak/events{/privacy}","received_events_url":"https://api.github.com/users/kosak/received_events","type":"User","site_admin":false},"repo":{"id":54276924,"name":"agario-client","full_name":"kosak/agario-client","owner":{"login":"kosak","id":720660,"avatar_url":"https://avatars.githubusercontent.com/u/720660?v=3","gravatar_id":"","url":"https://api.github.com/users/kosak","html_url":"https://github.com/kosak","followers_url":"https://api.github.com/users/kosak/followers","following_url":"https://api.github.com/users/kosak/following{/other_user}","gists_url":"https://api.github.com/users/kosak/gists{/gist_id}","starred_url":"https://api.github.com/users/kosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosak/subscriptions","organizations_url":"https://api.github.com/users/kosak/orgs","repos_url":"https://api.github.com/users/kosak/repos","events_url":"https://api.github.com/users/kosak/events{/privacy}","received_events_url":"https://api.github.com/users/kosak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kosak/agario-client","description":"Node.js agar.io client implementation","fork":true,"url":"https://api.github.com/repos/kosak/agario-client","forks_url":"https://api.github.com/repos/kosak/agario-client/forks","keys_url":"https://api.github.com/repos/kosak/agario-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kosak/agario-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kosak/agario-client/teams","hooks_url":"https://api.github.com/repos/kosak/agario-client/hooks","issue_events_url":"https://api.github.com/repos/kosak/agario-client/issues/events{/number}","events_url":"https://api.github.com/repos/kosak/agario-client/events","assignees_url":"https://api.github.com/repos/kosak/agario-client/assignees{/user}","branches_url":"https://api.github.com/repos/kosak/agario-client/branches{/branch}","tags_url":"https://api.github.com/repos/kosak/agario-client/tags","blobs_url":"https://api.github.com/repos/kosak/agario-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kosak/agario-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kosak/agario-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/kosak/agario-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kosak/agario-client/statuses/{sha}","languages_url":"https://api.github.com/repos/kosak/agario-client/languages","stargazers_url":"https://api.github.com/repos/kosak/agario-client/stargazers","contributors_url":"https://api.github.com/repos/kosak/agario-client/contributors","subscribers_url":"https://api.github.com/repos/kosak/agario-client/subscribers","subscription_url":"https://api.github.com/repos/kosak/agario-client/subscription","commits_url":"https://api.github.com/repos/kosak/agario-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/kosak/agario-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/kosak/agario-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/kosak/agario-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/kosak/agario-client/contents/{+path}","compare_url":"https://api.github.com/repos/kosak/agario-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kosak/agario-client/merges","archive_url":"https://api.github.com/repos/kosak/agario-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kosak/agario-client/downloads","issues_url":"https://api.github.com/repos/kosak/agario-client/issues{/number}","pulls_url":"https://api.github.com/repos/kosak/agario-client/pulls{/number}","milestones_url":"https://api.github.com/repos/kosak/agario-client/milestones{/number}","notifications_url":"https://api.github.com/repos/kosak/agario-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kosak/agario-client/labels{/name}","releases_url":"https://api.github.com/repos/kosak/agario-client/releases{/id}","deployments_url":"https://api.github.com/repos/kosak/agario-client/deployments","created_at":"2016-03-19T16:58:04Z","updated_at":"2016-03-19T16:58:06Z","pushed_at":"2016-03-19T18:23:01Z","git_url":"git://github.com/kosak/agario-client.git","ssh_url":"git@github.com:kosak/agario-client.git","clone_url":"https://github.com/kosak/agario-client.git","svn_url":"https://github.com/kosak/agario-client","homepage":"","size":240,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pulviscriptor:master","ref":"master","sha":"6ba257aacf12e453d50c0ea8e6c166118b785468","user":{"login":"pulviscriptor","id":11891880,"avatar_url":"https://avatars.githubusercontent.com/u/11891880?v=3","gravatar_id":"","url":"https://api.github.com/users/pulviscriptor","html_url":"https://github.com/pulviscriptor","followers_url":"https://api.github.com/users/pulviscriptor/followers","following_url":"https://api.github.com/users/pulviscriptor/following{/other_user}","gists_url":"https://api.github.com/users/pulviscriptor/gists{/gist_id}","starred_url":"https://api.github.com/users/pulviscriptor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulviscriptor/subscriptions","organizations_url":"https://api.github.com/users/pulviscriptor/orgs","repos_url":"https://api.github.com/users/pulviscriptor/repos","events_url":"https://api.github.com/users/pulviscriptor/events{/privacy}","received_events_url":"https://api.github.com/users/pulviscriptor/received_events","type":"User","site_admin":false},"repo":{"id":35005912,"name":"agario-client","full_name":"pulviscriptor/agario-client","owner":{"login":"pulviscriptor","id":11891880,"avatar_url":"https://avatars.githubusercontent.com/u/11891880?v=3","gravatar_id":"","url":"https://api.github.com/users/pulviscriptor","html_url":"https://github.com/pulviscriptor","followers_url":"https://api.github.com/users/pulviscriptor/followers","following_url":"https://api.github.com/users/pulviscriptor/following{/other_user}","gists_url":"https://api.github.com/users/pulviscriptor/gists{/gist_id}","starred_url":"https://api.github.com/users/pulviscriptor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulviscriptor/subscriptions","organizations_url":"https://api.github.com/users/pulviscriptor/orgs","repos_url":"https://api.github.com/users/pulviscriptor/repos","events_url":"https://api.github.com/users/pulviscriptor/events{/privacy}","received_events_url":"https://api.github.com/users/pulviscriptor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pulviscriptor/agario-client","description":"Node.js agar.io client implementation","fork":false,"url":"https://api.github.com/repos/pulviscriptor/agario-client","forks_url":"https://api.github.com/repos/pulviscriptor/agario-client/forks","keys_url":"https://api.github.com/repos/pulviscriptor/agario-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulviscriptor/agario-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulviscriptor/agario-client/teams","hooks_url":"https://api.github.com/repos/pulviscriptor/agario-client/hooks","issue_events_url":"https://api.github.com/repos/pulviscriptor/agario-client/issues/events{/number}","events_url":"https://api.github.com/repos/pulviscriptor/agario-client/events","assignees_url":"https://api.github.com/repos/pulviscriptor/agario-client/assignees{/user}","branches_url":"https://api.github.com/repos/pulviscriptor/agario-client/branches{/branch}","tags_url":"https://api.github.com/repos/pulviscriptor/agario-client/tags","blobs_url":"https://api.github.com/repos/pulviscriptor/agario-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulviscriptor/agario-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulviscriptor/agario-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulviscriptor/agario-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulviscriptor/agario-client/statuses/{sha}","languages_url":"https://api.github.com/repos/pulviscriptor/agario-client/languages","stargazers_url":"https://api.github.com/repos/pulviscriptor/agario-client/stargazers","contributors_url":"https://api.github.com/repos/pulviscriptor/agario-client/contributors","subscribers_url":"https://api.github.com/repos/pulviscriptor/agario-client/subscribers","subscription_url":"https://api.github.com/repos/pulviscriptor/agario-client/subscription","commits_url":"https://api.github.com/repos/pulviscriptor/agario-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulviscriptor/agario-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulviscriptor/agario-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulviscriptor/agario-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulviscriptor/agario-client/contents/{+path}","compare_url":"https://api.github.com/repos/pulviscriptor/agario-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulviscriptor/agario-client/merges","archive_url":"https://api.github.com/repos/pulviscriptor/agario-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulviscriptor/agario-client/downloads","issues_url":"https://api.github.com/repos/pulviscriptor/agario-client/issues{/number}","pulls_url":"https://api.github.com/repos/pulviscriptor/agario-client/pulls{/number}","milestones_url":"https://api.github.com/repos/pulviscriptor/agario-client/milestones{/number}","notifications_url":"https://api.github.com/repos/pulviscriptor/agario-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulviscriptor/agario-client/labels{/name}","releases_url":"https://api.github.com/repos/pulviscriptor/agario-client/releases{/id}","deployments_url":"https://api.github.com/repos/pulviscriptor/agario-client/deployments","created_at":"2015-05-04T00:23:17Z","updated_at":"2016-03-19T17:18:31Z","pushed_at":"2016-03-19T19:32:36Z","git_url":"git://github.com/pulviscriptor/agario-client.git","ssh_url":"git@github.com:pulviscriptor/agario-client.git","clone_url":"https://github.com/pulviscriptor/agario-client.git","svn_url":"https://github.com/pulviscriptor/agario-client","homepage":"","size":331,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":15,"forks":37,"open_issues":15,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120"},"html":{"href":"https://github.com/pulviscriptor/agario-client/pull/120"},"issue":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/issues/120"},"comments":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/pulviscriptor/agario-client/statuses/b7fb7adb04ed2e75646adbc1c19db40b4e521f61"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pulviscriptor","id":11891880,"avatar_url":"https://avatars.githubusercontent.com/u/11891880?v=3","gravatar_id":"","url":"https://api.github.com/users/pulviscriptor","html_url":"https://github.com/pulviscriptor","followers_url":"https://api.github.com/users/pulviscriptor/followers","following_url":"https://api.github.com/users/pulviscriptor/following{/other_user}","gists_url":"https://api.github.com/users/pulviscriptor/gists{/gist_id}","starred_url":"https://api.github.com/users/pulviscriptor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulviscriptor/subscriptions","organizations_url":"https://api.github.com/users/pulviscriptor/orgs","repos_url":"https://api.github.com/users/pulviscriptor/repos","events_url":"https://api.github.com/users/pulviscriptor/events{/privacy}","received_events_url":"https://api.github.com/users/pulviscriptor/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":2,"additions":21,"deletions":29,"changed_files":4}}