{"action":"created","comment":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/comments/33269350","id":33269350,"diff_hunk":"@@ -326,6 +326,29 @@ $('#rankings_file').change(function(){\n     reader.readAsBinaryString(f);\n });\n \n+$('.update-rankings').click(function(){\n+    $(this).css('background-color', '#eb9316');\n+    $.ajax({\n+            url: '10.0.100.5/pit/getdata?random=' + Math.random(),\n+            cache: false,\n+            timeout: 5000, success: function (data) {\n+                rankings = ['Rank', 'Team', 'Avg', 'CP', 'AP', 'RC', 'TP', 'LP', 'Played'];\n+                rankData = JSON.parse(data);\n+                for(var i=0; i<rankData.length; i++){\n+                    // Turn team number -> team key\n+                    rankData[i]['Team'] = \"frc\"+rankData[i]['Team'];\n+                    rankings.push(rankData[i]);\n+                }\n+                makeRequest('/api/trusted/v1/event/' + $('#event_key').val() + '/rankings/update', JSON.stringify(rankings), $(this));","path":"static/javascript/tba_js/eventwizard_apiwrite.js","position":17,"original_position":17,"commit_id":"8b71b3beddae6be3d79108c6442ca57f06ca30a2","original_commit_id":"8b71b3beddae6be3d79108c6442ca57f06ca30a2","user":{"login":"phil-lopreiato","id":2754863,"avatar_url":"https://avatars.githubusercontent.com/u/2754863?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-lopreiato","html_url":"https://github.com/phil-lopreiato","followers_url":"https://api.github.com/users/phil-lopreiato/followers","following_url":"https://api.github.com/users/phil-lopreiato/following{/other_user}","gists_url":"https://api.github.com/users/phil-lopreiato/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-lopreiato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-lopreiato/subscriptions","organizations_url":"https://api.github.com/users/phil-lopreiato/orgs","repos_url":"https://api.github.com/users/phil-lopreiato/repos","events_url":"https://api.github.com/users/phil-lopreiato/events{/privacy}","received_events_url":"https://api.github.com/users/phil-lopreiato/received_events","type":"User","site_admin":false},"body":"Oh, wait, no it isn't. Will fix tonight","created_at":"2015-06-25T15:40:50Z","updated_at":"2015-06-25T15:40:50Z","html_url":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210#discussion_r33269350","pull_request_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210","_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/comments/33269350"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210#discussion_r33269350"},"pull_request":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210"}}},"pull_request":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210","id":36260665,"html_url":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210","diff_url":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210.diff","patch_url":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210.patch","issue_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/1210","number":1210,"state":"open","locked":false,"title":"EventWizard import Ranks from FMS server","user":{"login":"phil-lopreiato","id":2754863,"avatar_url":"https://avatars.githubusercontent.com/u/2754863?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-lopreiato","html_url":"https://github.com/phil-lopreiato","followers_url":"https://api.github.com/users/phil-lopreiato/followers","following_url":"https://api.github.com/users/phil-lopreiato/following{/other_user}","gists_url":"https://api.github.com/users/phil-lopreiato/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-lopreiato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-lopreiato/subscriptions","organizations_url":"https://api.github.com/users/phil-lopreiato/orgs","repos_url":"https://api.github.com/users/phil-lopreiato/repos","events_url":"https://api.github.com/users/phil-lopreiato/events{/privacy}","received_events_url":"https://api.github.com/users/phil-lopreiato/received_events","type":"User","site_admin":false},"body":"Import data using the same ajax data that Pit Display uses. Can't be tested, because I don't have FMS","created_at":"2015-05-27T01:06:17Z","updated_at":"2015-06-25T15:40:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa412891d3718a2bc48ab9edc16f696a81fc30f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210/commits","review_comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210/comments","review_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/1210/comments","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/statuses/8b71b3beddae6be3d79108c6442ca57f06ca30a2","head":{"label":"phil-lopreiato:rankings-import","ref":"rankings-import","sha":"8b71b3beddae6be3d79108c6442ca57f06ca30a2","user":{"login":"phil-lopreiato","id":2754863,"avatar_url":"https://avatars.githubusercontent.com/u/2754863?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-lopreiato","html_url":"https://github.com/phil-lopreiato","followers_url":"https://api.github.com/users/phil-lopreiato/followers","following_url":"https://api.github.com/users/phil-lopreiato/following{/other_user}","gists_url":"https://api.github.com/users/phil-lopreiato/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-lopreiato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-lopreiato/subscriptions","organizations_url":"https://api.github.com/users/phil-lopreiato/orgs","repos_url":"https://api.github.com/users/phil-lopreiato/repos","events_url":"https://api.github.com/users/phil-lopreiato/events{/privacy}","received_events_url":"https://api.github.com/users/phil-lopreiato/received_events","type":"User","site_admin":false},"repo":{"id":18301544,"name":"the-blue-alliance","full_name":"phil-lopreiato/the-blue-alliance","owner":{"login":"phil-lopreiato","id":2754863,"avatar_url":"https://avatars.githubusercontent.com/u/2754863?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-lopreiato","html_url":"https://github.com/phil-lopreiato","followers_url":"https://api.github.com/users/phil-lopreiato/followers","following_url":"https://api.github.com/users/phil-lopreiato/following{/other_user}","gists_url":"https://api.github.com/users/phil-lopreiato/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-lopreiato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-lopreiato/subscriptions","organizations_url":"https://api.github.com/users/phil-lopreiato/orgs","repos_url":"https://api.github.com/users/phil-lopreiato/repos","events_url":"https://api.github.com/users/phil-lopreiato/events{/privacy}","received_events_url":"https://api.github.com/users/phil-lopreiato/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phil-lopreiato/the-blue-alliance","description":"FIRST Robotics match video archive website","fork":true,"url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance","forks_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/forks","keys_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/teams","hooks_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/hooks","issue_events_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/issues/events{/number}","events_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/events","assignees_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/assignees{/user}","branches_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/branches{/branch}","tags_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/tags","blobs_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/languages","stargazers_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/stargazers","contributors_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/contributors","subscribers_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/subscribers","subscription_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/subscription","commits_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/contents/{+path}","compare_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/merges","archive_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/downloads","issues_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/issues{/number}","pulls_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/labels{/name}","releases_url":"https://api.github.com/repos/phil-lopreiato/the-blue-alliance/releases{/id}","created_at":"2014-03-31T17:22:46Z","updated_at":"2015-04-28T01:50:40Z","pushed_at":"2015-06-24T18:30:09Z","git_url":"git://github.com/phil-lopreiato/the-blue-alliance.git","ssh_url":"git@github.com:phil-lopreiato/the-blue-alliance.git","clone_url":"https://github.com/phil-lopreiato/the-blue-alliance.git","svn_url":"https://github.com/phil-lopreiato/the-blue-alliance","homepage":"thebluealliance.com","size":17729,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"the-blue-alliance:master","ref":"master","sha":"66d7d2c617a9e582f7c070cd9012e6eca06ecd0d","user":{"login":"the-blue-alliance","id":7354965,"avatar_url":"https://avatars.githubusercontent.com/u/7354965?v=3","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"repo":{"id":888427,"name":"the-blue-alliance","full_name":"the-blue-alliance/the-blue-alliance","owner":{"login":"the-blue-alliance","id":7354965,"avatar_url":"https://avatars.githubusercontent.com/u/7354965?v=3","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-blue-alliance/the-blue-alliance","description":"A webapp for accessing information about the FIRST Robotics Competition.","fork":false,"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance","forks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/forks","keys_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/teams","hooks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/hooks","issue_events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/events{/number}","events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/events","assignees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/assignees{/user}","branches_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/branches{/branch}","tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/tags","blobs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/languages","stargazers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/stargazers","contributors_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/contributors","subscribers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/subscribers","subscription_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/subscription","commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/contents/{+path}","compare_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/merges","archive_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/downloads","issues_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues{/number}","pulls_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/labels{/name}","releases_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/releases{/id}","created_at":"2010-09-04T20:34:11Z","updated_at":"2015-06-22T16:47:32Z","pushed_at":"2015-06-25T15:21:21Z","git_url":"git://github.com/the-blue-alliance/the-blue-alliance.git","ssh_url":"git@github.com:the-blue-alliance/the-blue-alliance.git","clone_url":"https://github.com/the-blue-alliance/the-blue-alliance.git","svn_url":"https://github.com/the-blue-alliance/the-blue-alliance","homepage":"thebluealliance.com","size":21696,"stargazers_count":102,"watchers_count":102,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":143,"forks":58,"open_issues":143,"watchers":102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance/pull/1210"},"issue":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/1210"},"comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/issues/1210/comments"},"review_comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210/comments"},"review_comment":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/pulls/1210/commits"},"statuses":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance/statuses/8b71b3beddae6be3d79108c6442ca57f06ca30a2"}}}}