{"action":"opened","number":102,"pull_request":{"url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102","id":128319754,"html_url":"https://github.com/ucam-cl-dtg/isaac-api/pull/102","diff_url":"https://github.com/ucam-cl-dtg/isaac-api/pull/102.diff","patch_url":"https://github.com/ucam-cl-dtg/isaac-api/pull/102.patch","issue_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/102","number":102,"state":"open","locked":false,"title":"generalised user preference fetching","user":{"login":"dunderwood88","id":22501040,"avatar_url":"https://avatars1.githubusercontent.com/u/22501040?v=3","gravatar_id":"","url":"https://api.github.com/users/dunderwood88","html_url":"https://github.com/dunderwood88","followers_url":"https://api.github.com/users/dunderwood88/followers","following_url":"https://api.github.com/users/dunderwood88/following{/other_user}","gists_url":"https://api.github.com/users/dunderwood88/gists{/gist_id}","starred_url":"https://api.github.com/users/dunderwood88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunderwood88/subscriptions","organizations_url":"https://api.github.com/users/dunderwood88/orgs","repos_url":"https://api.github.com/users/dunderwood88/repos","events_url":"https://api.github.com/users/dunderwood88/events{/privacy}","received_events_url":"https://api.github.com/users/dunderwood88/received_events","type":"User","site_admin":false},"body":"What do people think of this? (Not quite finished)\r\n\r\nAssuming the email preferences are migrated to the user_preference table...\r\n\r\nI've changed the \"subject interest\" end point to a \"user preference\" endpoint, which fetches all user preferences and returns them all in a json blob. Therefore, instead of having two separate endpoints for email and subject preferences, they are returned together and filtered on the front end. This removes the Isaac specific element of the subject interests.\r\n\r\nPreviously updates to subject preferences where filtered by a hard-coded \"acceptedSubjects\" list. Perhaps we could filter *all* accepted user preferences by having them in a config file maybe?\r\n\r\nThis would solve both issues 845 and 846.\r\n\r\n","created_at":"2017-06-30T08:30:14Z","updated_at":"2017-06-30T08:30:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102/commits","review_comments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102/comments","review_comment_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/102/comments","statuses_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/statuses/bff4f3e3f46743b3726212abac264682b69f4670","head":{"label":"ucam-cl-dtg:issue/846/user-preferences","ref":"issue/846/user-preferences","sha":"bff4f3e3f46743b3726212abac264682b69f4670","user":{"login":"ucam-cl-dtg","id":1140917,"avatar_url":"https://avatars0.githubusercontent.com/u/1140917?v=3","gravatar_id":"","url":"https://api.github.com/users/ucam-cl-dtg","html_url":"https://github.com/ucam-cl-dtg","followers_url":"https://api.github.com/users/ucam-cl-dtg/followers","following_url":"https://api.github.com/users/ucam-cl-dtg/following{/other_user}","gists_url":"https://api.github.com/users/ucam-cl-dtg/gists{/gist_id}","starred_url":"https://api.github.com/users/ucam-cl-dtg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucam-cl-dtg/subscriptions","organizations_url":"https://api.github.com/users/ucam-cl-dtg/orgs","repos_url":"https://api.github.com/users/ucam-cl-dtg/repos","events_url":"https://api.github.com/users/ucam-cl-dtg/events{/privacy}","received_events_url":"https://api.github.com/users/ucam-cl-dtg/received_events","type":"Organization","site_admin":false},"repo":{"id":15674325,"name":"isaac-api","full_name":"ucam-cl-dtg/isaac-api","owner":{"login":"ucam-cl-dtg","id":1140917,"avatar_url":"https://avatars0.githubusercontent.com/u/1140917?v=3","gravatar_id":"","url":"https://api.github.com/users/ucam-cl-dtg","html_url":"https://github.com/ucam-cl-dtg","followers_url":"https://api.github.com/users/ucam-cl-dtg/followers","following_url":"https://api.github.com/users/ucam-cl-dtg/following{/other_user}","gists_url":"https://api.github.com/users/ucam-cl-dtg/gists{/gist_id}","starred_url":"https://api.github.com/users/ucam-cl-dtg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucam-cl-dtg/subscriptions","organizations_url":"https://api.github.com/users/ucam-cl-dtg/orgs","repos_url":"https://api.github.com/users/ucam-cl-dtg/repos","events_url":"https://api.github.com/users/ucam-cl-dtg/events{/privacy}","received_events_url":"https://api.github.com/users/ucam-cl-dtg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ucam-cl-dtg/isaac-api","description":"Isaac / Segue Content Management APIs","fork":false,"url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api","forks_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/forks","keys_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/teams","hooks_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/hooks","issue_events_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/events{/number}","events_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/events","assignees_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/assignees{/user}","branches_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/branches{/branch}","tags_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/tags","blobs_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/languages","stargazers_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/stargazers","contributors_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/contributors","subscribers_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/subscribers","subscription_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/subscription","commits_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/contents/{+path}","compare_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/merges","archive_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/downloads","issues_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues{/number}","pulls_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/labels{/name}","releases_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/releases{/id}","deployments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/deployments","created_at":"2014-01-06T13:12:33Z","updated_at":"2016-10-26T15:14:25Z","pushed_at":"2017-06-30T08:22:53Z","git_url":"git://github.com/ucam-cl-dtg/isaac-api.git","ssh_url":"git@github.com:ucam-cl-dtg/isaac-api.git","clone_url":"https://github.com/ucam-cl-dtg/isaac-api.git","svn_url":"https://github.com/ucam-cl-dtg/isaac-api","homepage":"https://isaacphysics.org/api-docs","size":7169,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"ucam-cl-dtg:master","ref":"master","sha":"3d7568d3a73b63ba7c0c27812c6e4f75b4f3d1a5","user":{"login":"ucam-cl-dtg","id":1140917,"avatar_url":"https://avatars0.githubusercontent.com/u/1140917?v=3","gravatar_id":"","url":"https://api.github.com/users/ucam-cl-dtg","html_url":"https://github.com/ucam-cl-dtg","followers_url":"https://api.github.com/users/ucam-cl-dtg/followers","following_url":"https://api.github.com/users/ucam-cl-dtg/following{/other_user}","gists_url":"https://api.github.com/users/ucam-cl-dtg/gists{/gist_id}","starred_url":"https://api.github.com/users/ucam-cl-dtg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucam-cl-dtg/subscriptions","organizations_url":"https://api.github.com/users/ucam-cl-dtg/orgs","repos_url":"https://api.github.com/users/ucam-cl-dtg/repos","events_url":"https://api.github.com/users/ucam-cl-dtg/events{/privacy}","received_events_url":"https://api.github.com/users/ucam-cl-dtg/received_events","type":"Organization","site_admin":false},"repo":{"id":15674325,"name":"isaac-api","full_name":"ucam-cl-dtg/isaac-api","owner":{"login":"ucam-cl-dtg","id":1140917,"avatar_url":"https://avatars0.githubusercontent.com/u/1140917?v=3","gravatar_id":"","url":"https://api.github.com/users/ucam-cl-dtg","html_url":"https://github.com/ucam-cl-dtg","followers_url":"https://api.github.com/users/ucam-cl-dtg/followers","following_url":"https://api.github.com/users/ucam-cl-dtg/following{/other_user}","gists_url":"https://api.github.com/users/ucam-cl-dtg/gists{/gist_id}","starred_url":"https://api.github.com/users/ucam-cl-dtg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucam-cl-dtg/subscriptions","organizations_url":"https://api.github.com/users/ucam-cl-dtg/orgs","repos_url":"https://api.github.com/users/ucam-cl-dtg/repos","events_url":"https://api.github.com/users/ucam-cl-dtg/events{/privacy}","received_events_url":"https://api.github.com/users/ucam-cl-dtg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ucam-cl-dtg/isaac-api","description":"Isaac / Segue Content Management APIs","fork":false,"url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api","forks_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/forks","keys_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/teams","hooks_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/hooks","issue_events_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/events{/number}","events_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/events","assignees_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/assignees{/user}","branches_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/branches{/branch}","tags_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/tags","blobs_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/languages","stargazers_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/stargazers","contributors_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/contributors","subscribers_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/subscribers","subscription_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/subscription","commits_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/contents/{+path}","compare_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/merges","archive_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/downloads","issues_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues{/number}","pulls_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/labels{/name}","releases_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/releases{/id}","deployments_url":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/deployments","created_at":"2014-01-06T13:12:33Z","updated_at":"2016-10-26T15:14:25Z","pushed_at":"2017-06-30T08:22:53Z","git_url":"git://github.com/ucam-cl-dtg/isaac-api.git","ssh_url":"git@github.com:ucam-cl-dtg/isaac-api.git","clone_url":"https://github.com/ucam-cl-dtg/isaac-api.git","svn_url":"https://github.com/ucam-cl-dtg/isaac-api","homepage":"https://isaacphysics.org/api-docs","size":7169,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102"},"html":{"href":"https://github.com/ucam-cl-dtg/isaac-api/pull/102"},"issue":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/102"},"comments":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/ucam-cl-dtg/isaac-api/statuses/bff4f3e3f46743b3726212abac264682b69f4670"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":103,"deletions":82,"changed_files":4}}
{"actor":{"display_login":"dunderwood88"}}