{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/frontend/pulls/comments/23922170","id":23922170,"diff_hunk":"@@ -50,15 +50,17 @@ def random_page\n     # new content.\n     expires_in 5.seconds\n \n-    base_url = \"https://www.gov.uk/api/artefacts.json\"\n-    total_pages = JSON.parse(RestClient.get(base_url).body)['pages']\n+    base_url = \"https://www.gov.uk/api/search.json\"\n+    total_pages = JSON.parse(RestClient.get(\"#{base_url}?count=0\"))['total']","path":"app/controllers/root_controller.rb","position":null,"original_position":7,"commit_id":"0f07069ce3c34c2fef5e37184c921164693c3dd6","original_commit_id":"0b9107713b4196436eabb6b3732a1d4b87aed2e8","user":{"login":"issyl0","id":355033,"avatar_url":"https://avatars.githubusercontent.com/u/355033?v=3","gravatar_id":"","url":"https://api.github.com/users/issyl0","html_url":"https://github.com/issyl0","followers_url":"https://api.github.com/users/issyl0/followers","following_url":"https://api.github.com/users/issyl0/following{/other_user}","gists_url":"https://api.github.com/users/issyl0/gists{/gist_id}","starred_url":"https://api.github.com/users/issyl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/issyl0/subscriptions","organizations_url":"https://api.github.com/users/issyl0/orgs","repos_url":"https://api.github.com/users/issyl0/repos","events_url":"https://api.github.com/users/issyl0/events{/privacy}","received_events_url":"https://api.github.com/users/issyl0/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-02-02T12:48:22Z","updated_at":"2015-02-02T12:48:22Z","html_url":"https://github.com/alphagov/frontend/pull/742#discussion_r23922170","pull_request_url":"https://api.github.com/repos/alphagov/frontend/pulls/742","_links":{"self":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/comments/23922170"},"html":{"href":"https://github.com/alphagov/frontend/pull/742#discussion_r23922170"},"pull_request":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/742"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/frontend/pulls/742","id":28353758,"html_url":"https://github.com/alphagov/frontend/pull/742","diff_url":"https://github.com/alphagov/frontend/pull/742.diff","patch_url":"https://github.com/alphagov/frontend/pull/742.patch","issue_url":"https://api.github.com/repos/alphagov/frontend/issues/742","number":742,"state":"open","locked":false,"title":"Use the Rummager API instead of the Content API for /random","user":{"login":"issyl0","id":355033,"avatar_url":"https://avatars.githubusercontent.com/u/355033?v=3","gravatar_id":"","url":"https://api.github.com/users/issyl0","html_url":"https://github.com/issyl0","followers_url":"https://api.github.com/users/issyl0/followers","following_url":"https://api.github.com/users/issyl0/following{/other_user}","gists_url":"https://api.github.com/users/issyl0/gists{/gist_id}","starred_url":"https://api.github.com/users/issyl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/issyl0/subscriptions","organizations_url":"https://api.github.com/users/issyl0/orgs","repos_url":"https://api.github.com/users/issyl0/repos","events_url":"https://api.github.com/users/issyl0/events{/privacy}","received_events_url":"https://api.github.com/users/issyl0/received_events","type":"User","site_admin":false},"body":"- Rummager is faster than the Content API and is better designed for\r\n  this purpose of loading non-cached pages in quick succession.","created_at":"2015-01-30T11:10:22Z","updated_at":"2015-02-02T12:48:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"304bade48272e4e8b6da4c0cf00c02d3338375c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/frontend/pulls/742/commits","review_comments_url":"https://api.github.com/repos/alphagov/frontend/pulls/742/comments","review_comment_url":"https://api.github.com/repos/alphagov/frontend/pulls/comments/{number}","comments_url":"https://api.github.com/repos/alphagov/frontend/issues/742/comments","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/0f07069ce3c34c2fef5e37184c921164693c3dd6","head":{"label":"alphagov:use_rummager_not_contentapi","ref":"use_rummager_not_contentapi","sha":"0f07069ce3c34c2fef5e37184c921164693c3dd6","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2331534,"name":"frontend","full_name":"alphagov/frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/frontend","description":"Front-end (and preview) site for single domain","fork":false,"url":"https://api.github.com/repos/alphagov/frontend","forks_url":"https://api.github.com/repos/alphagov/frontend/forks","keys_url":"https://api.github.com/repos/alphagov/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/frontend/events","assignees_url":"https://api.github.com/repos/alphagov/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/frontend/issues/comments/{number}","contents_url":"https://api.github.com/repos/alphagov/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/frontend/merges","archive_url":"https://api.github.com/repos/alphagov/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/frontend/releases{/id}","created_at":"2011-09-06T00:16:08Z","updated_at":"2015-02-02T11:27:23Z","pushed_at":"2015-02-02T11:45:13Z","git_url":"git://github.com/alphagov/frontend.git","ssh_url":"git@github.com:alphagov/frontend.git","clone_url":"https://github.com/alphagov/frontend.git","svn_url":"https://github.com/alphagov/frontend","homepage":"","size":32124,"stargazers_count":193,"watchers_count":193,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":2,"forks":33,"open_issues":2,"watchers":193,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"a754c01611a10543bff6e01807a65dba6af89ced","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2331534,"name":"frontend","full_name":"alphagov/frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/frontend","description":"Front-end (and preview) site for single domain","fork":false,"url":"https://api.github.com/repos/alphagov/frontend","forks_url":"https://api.github.com/repos/alphagov/frontend/forks","keys_url":"https://api.github.com/repos/alphagov/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/frontend/events","assignees_url":"https://api.github.com/repos/alphagov/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/frontend/issues/comments/{number}","contents_url":"https://api.github.com/repos/alphagov/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/frontend/merges","archive_url":"https://api.github.com/repos/alphagov/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/frontend/releases{/id}","created_at":"2011-09-06T00:16:08Z","updated_at":"2015-02-02T11:27:23Z","pushed_at":"2015-02-02T11:45:13Z","git_url":"git://github.com/alphagov/frontend.git","ssh_url":"git@github.com:alphagov/frontend.git","clone_url":"https://github.com/alphagov/frontend.git","svn_url":"https://github.com/alphagov/frontend","homepage":"","size":32124,"stargazers_count":193,"watchers_count":193,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":2,"forks":33,"open_issues":2,"watchers":193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/742"},"html":{"href":"https://github.com/alphagov/frontend/pull/742"},"issue":{"href":"https://api.github.com/repos/alphagov/frontend/issues/742"},"comments":{"href":"https://api.github.com/repos/alphagov/frontend/issues/742/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/742/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/742/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/frontend/statuses/0f07069ce3c34c2fef5e37184c921164693c3dd6"}}}}