{"action":"closed","number":6463,"pull_request":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463","id":70555765,"html_url":"https://github.com/DoSomething/phoenix/pull/6463","diff_url":"https://github.com/DoSomething/phoenix/pull/6463.diff","patch_url":"https://github.com/DoSomething/phoenix/pull/6463.patch","issue_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6463","number":6463,"state":"closed","locked":false,"title":"Update user endpoint to accept country code and language.","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\nThis updates the API endpoint to _not_ try to use the Fastly header to set a user's country code. Since these requests are (almost?) exclusively coming from our own internal services, this will always just set the user's country to the location of the server (US).\r\n\r\nThe endpoint now accepts a `country` value, which will be saved to the user's address field. If nothing is provided for that field, it defaults to `US`.\r\n\r\n#### How should this be reviewed?\r\nHit that endpoint. Does it now save a country code and language? It should.\r\n\r\n#### Any background context you want to provide?\r\nShould it default to US? Or should we try to save `null` to that user's country? Also, should we consider allowing this endpoint to accept a full address?\r\n\r\n#### Relevant tickets\r\nFixes #6442.\r\n\r\n#### Checklist\r\n- [ ] Documentation added for new features/changed endpoints.\r\n","created_at":"2016-05-18T16:05:39Z","updated_at":"2016-05-18T17:52:15Z","closed_at":"2016-05-18T17:52:15Z","merged_at":"2016-05-18T17:52:15Z","merge_commit_sha":"fcec70b654e1e455abe1122b72abf7c13deaeb56","assignee":{"login":"angaither","id":645205,"avatar_url":"https://avatars.githubusercontent.com/u/645205?v=3","gravatar_id":"","url":"https://api.github.com/users/angaither","html_url":"https://github.com/angaither","followers_url":"https://api.github.com/users/angaither/followers","following_url":"https://api.github.com/users/angaither/following{/other_user}","gists_url":"https://api.github.com/users/angaither/gists{/gist_id}","starred_url":"https://api.github.com/users/angaither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angaither/subscriptions","organizations_url":"https://api.github.com/users/angaither/orgs","repos_url":"https://api.github.com/users/angaither/repos","events_url":"https://api.github.com/users/angaither/events{/privacy}","received_events_url":"https://api.github.com/users/angaither/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463/commits","review_comments_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463/comments","review_comment_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6463/comments","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/dce0cf9db5a74ef8d192de15788b7b729cde4366","head":{"label":"DFurnes:api-country-code","ref":"api-country-code","sha":"dce0cf9db5a74ef8d192de15788b7b729cde4366","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"repo":{"id":23975099,"name":"phoenix","full_name":"DFurnes/phoenix","owner":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DFurnes/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/DFurnes/phoenix","forks_url":"https://api.github.com/repos/DFurnes/phoenix/forks","keys_url":"https://api.github.com/repos/DFurnes/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DFurnes/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DFurnes/phoenix/teams","hooks_url":"https://api.github.com/repos/DFurnes/phoenix/hooks","issue_events_url":"https://api.github.com/repos/DFurnes/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/DFurnes/phoenix/events","assignees_url":"https://api.github.com/repos/DFurnes/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/DFurnes/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/DFurnes/phoenix/tags","blobs_url":"https://api.github.com/repos/DFurnes/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DFurnes/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DFurnes/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/DFurnes/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DFurnes/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/DFurnes/phoenix/languages","stargazers_url":"https://api.github.com/repos/DFurnes/phoenix/stargazers","contributors_url":"https://api.github.com/repos/DFurnes/phoenix/contributors","subscribers_url":"https://api.github.com/repos/DFurnes/phoenix/subscribers","subscription_url":"https://api.github.com/repos/DFurnes/phoenix/subscription","commits_url":"https://api.github.com/repos/DFurnes/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/DFurnes/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/DFurnes/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/DFurnes/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/DFurnes/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/DFurnes/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DFurnes/phoenix/merges","archive_url":"https://api.github.com/repos/DFurnes/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DFurnes/phoenix/downloads","issues_url":"https://api.github.com/repos/DFurnes/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/DFurnes/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/DFurnes/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/DFurnes/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DFurnes/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/DFurnes/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/DFurnes/phoenix/deployments","created_at":"2014-09-12T20:07:06Z","updated_at":"2016-01-29T19:33:17Z","pushed_at":"2016-05-18T17:46:31Z","git_url":"git://github.com/DFurnes/phoenix.git","ssh_url":"git@github.com:DFurnes/phoenix.git","clone_url":"https://github.com/DFurnes/phoenix.git","svn_url":"https://github.com/DFurnes/phoenix","homepage":"http://www.dosomething.org/","size":16949,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"3eb8873dae70642fea3c52f5c0730033aae16396","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"phoenix","full_name":"DoSomething/phoenix","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/phoenix","forks_url":"https://api.github.com/repos/DoSomething/phoenix/forks","keys_url":"https://api.github.com/repos/DoSomething/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/phoenix/teams","hooks_url":"https://api.github.com/repos/DoSomething/phoenix/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/phoenix/events","assignees_url":"https://api.github.com/repos/DoSomething/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/phoenix/tags","blobs_url":"https://api.github.com/repos/DoSomething/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/phoenix/languages","stargazers_url":"https://api.github.com/repos/DoSomething/phoenix/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/phoenix/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/phoenix/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/phoenix/subscription","commits_url":"https://api.github.com/repos/DoSomething/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/phoenix/merges","archive_url":"https://api.github.com/repos/DoSomething/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/phoenix/downloads","issues_url":"https://api.github.com/repos/DoSomething/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/phoenix/deployments","created_at":"2013-10-15T14:50:48Z","updated_at":"2016-01-11T18:53:47Z","pushed_at":"2016-05-18T17:52:15Z","git_url":"git://github.com/DoSomething/phoenix.git","ssh_url":"git@github.com:DoSomething/phoenix.git","clone_url":"https://github.com/DoSomething/phoenix.git","svn_url":"https://github.com/DoSomething/phoenix","homepage":"http://www.dosomething.org/","size":17776,"stargazers_count":28,"watchers_count":28,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":208,"forks":19,"open_issues":208,"watchers":28,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/6463"},"issue":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6463"},"comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6463/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6463/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/phoenix/statuses/dce0cf9db5a74ef8d192de15788b7b729cde4366"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"comments":8,"review_comments":0,"commits":3,"additions":8,"deletions":5,"changed_files":1}}