{"action":"closed","number":523,"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523","id":53967941,"html_url":"https://github.com/Financial-Times/next-myft-page/pull/523","diff_url":"https://github.com/Financial-Times/next-myft-page/pull/523.diff","patch_url":"https://github.com/Financial-Times/next-myft-page/pull/523.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/523","number":523,"state":"closed","locked":false,"title":"Refactor list fetching","user":{"login":"phamann","id":80089,"avatar_url":"https://avatars.githubusercontent.com/u/80089?v=3","gravatar_id":"","url":"https://api.github.com/users/phamann","html_url":"https://github.com/phamann","followers_url":"https://api.github.com/users/phamann/followers","following_url":"https://api.github.com/users/phamann/following{/other_user}","gists_url":"https://api.github.com/users/phamann/gists{/gist_id}","starred_url":"https://api.github.com/users/phamann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phamann/subscriptions","organizations_url":"https://api.github.com/users/phamann/orgs","repos_url":"https://api.github.com/users/phamann/repos","events_url":"https://api.github.com/users/phamann/events{/privacy}","received_events_url":"https://api.github.com/users/phamann/received_events","type":"User","site_admin":false},"body":"Currently to construct the `/myft/lists` page we are making a DB HTTP request per list and not limiting the amount of lists we fetch. For users with a lot of lists and list content this is a very expensive operation and has potential to fail. Using the new [custom endpoint](https://github.com/Financial-Times/next-myft-api/pull/109) exposed on the myft-api we can wrap this up into a single call which supports pagination.\r\n\r\nThis PR refactors all locations in the code base that we fetch all lists for a user, and introduces pagination functionality to the all lists page.","created_at":"2015-12-17T12:02:24Z","updated_at":"2015-12-17T13:38:11Z","closed_at":"2015-12-17T13:38:10Z","merged_at":"2015-12-17T13:38:10Z","merge_commit_sha":"b871839a7fcc1a6034edb7c0eb9cb425d153e6f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/523/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-page/statuses/6b867033ead458a3e7bd50487d7c5971d17cbba1","head":{"label":"Financial-Times:all-lists","ref":"all-lists","sha":"6b867033ead458a3e7bd50487d7c5971d17cbba1","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":28864313,"name":"next-myft-page","full_name":"Financial-Times/next-myft-page","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-page","description":"My Page (e.g. following, recommended, saved for later)","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-page","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-page/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-page/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-page/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-page/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-page/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-page/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-page/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-page/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-page/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-page/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-page/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-page/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-page/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-page/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-page/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-page/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-page/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-page/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-page/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-page/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-page/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-page/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-page/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-page/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-page/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-page/releases{/id}","created_at":"2015-01-06T13:18:01Z","updated_at":"2015-11-06T11:22:51Z","pushed_at":"2015-12-17T13:38:11Z","git_url":"git://github.com/Financial-Times/next-myft-page.git","ssh_url":"git@github.com:Financial-Times/next-myft-page.git","clone_url":"https://github.com/Financial-Times/next-myft-page.git","svn_url":"https://github.com/Financial-Times/next-myft-page","homepage":null,"size":47370,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"21357239569937c56e687f42769cef074a0dc03d","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":28864313,"name":"next-myft-page","full_name":"Financial-Times/next-myft-page","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-page","description":"My Page (e.g. following, recommended, saved for later)","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-page","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-page/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-page/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-page/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-page/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-page/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-page/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-page/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-page/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-page/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-page/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-page/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-page/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-page/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-page/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-page/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-page/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-page/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-page/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-page/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-page/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-page/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-page/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-page/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-page/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-page/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-page/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-page/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-page/releases{/id}","created_at":"2015-01-06T13:18:01Z","updated_at":"2015-11-06T11:22:51Z","pushed_at":"2015-12-17T13:38:11Z","git_url":"git://github.com/Financial-Times/next-myft-page.git","ssh_url":"git@github.com:Financial-Times/next-myft-page.git","clone_url":"https://github.com/Financial-Times/next-myft-page.git","svn_url":"https://github.com/Financial-Times/next-myft-page","homepage":null,"size":47370,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523"},"html":{"href":"https://github.com/Financial-Times/next-myft-page/pull/523"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/523"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/issues/523/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/pulls/523/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-myft-page/statuses/6b867033ead458a3e7bd50487d7c5971d17cbba1"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"phamann","id":80089,"avatar_url":"https://avatars.githubusercontent.com/u/80089?v=3","gravatar_id":"","url":"https://api.github.com/users/phamann","html_url":"https://github.com/phamann","followers_url":"https://api.github.com/users/phamann/followers","following_url":"https://api.github.com/users/phamann/following{/other_user}","gists_url":"https://api.github.com/users/phamann/gists{/gist_id}","starred_url":"https://api.github.com/users/phamann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phamann/subscriptions","organizations_url":"https://api.github.com/users/phamann/orgs","repos_url":"https://api.github.com/users/phamann/repos","events_url":"https://api.github.com/users/phamann/events{/privacy}","received_events_url":"https://api.github.com/users/phamann/received_events","type":"User","site_admin":false},"comments":1,"review_comments":1,"commits":5,"additions":84,"deletions":59,"changed_files":8}}