{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/comments/106587323","pull_request_review_id":27515950,"id":106587323,"diff_hunk":"@@ -105,10 +105,7 @@ const App = {\n     this.when(\n       this.ajax('getBrands'),\n       this.ajax('getLocales')\n-    ).then(function(brandsResponse, localeResponse) {\n-      var brandsData = brandsResponse[0],\n-          localeData = localeResponse[0];","path":"src/javascripts/answer_suggestions_app.js","position":6,"original_position":6,"commit_id":"717774c351945d45e83f496a3b64c25d73a0953a","original_commit_id":"717774c351945d45e83f496a3b64c25d73a0953a","user":{"login":"nick-f","id":754567,"avatar_url":"https://avatars2.githubusercontent.com/u/754567?v=3","gravatar_id":"","url":"https://api.github.com/users/nick-f","html_url":"https://github.com/nick-f","followers_url":"https://api.github.com/users/nick-f/followers","following_url":"https://api.github.com/users/nick-f/following{/other_user}","gists_url":"https://api.github.com/users/nick-f/gists{/gist_id}","starred_url":"https://api.github.com/users/nick-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick-f/subscriptions","organizations_url":"https://api.github.com/users/nick-f/orgs","repos_url":"https://api.github.com/users/nick-f/repos","events_url":"https://api.github.com/users/nick-f/events{/privacy}","received_events_url":"https://api.github.com/users/nick-f/received_events","type":"User","site_admin":false},"body":"Looks like the response returns named objects. Restoring the old code and changing `brandsResponse[0]` to `brandsResponse.brands` seems to work.","created_at":"2017-03-17T05:42:57Z","updated_at":"2017-03-17T05:42:57Z","html_url":"https://github.com/zendesk/answer_suggestion_app/pull/74#discussion_r106587323","pull_request_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/comments/106587323"},"html":{"href":"https://github.com/zendesk/answer_suggestion_app/pull/74#discussion_r106587323"},"pull_request":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74","id":110754500,"html_url":"https://github.com/zendesk/answer_suggestion_app/pull/74","diff_url":"https://github.com/zendesk/answer_suggestion_app/pull/74.diff","patch_url":"https://github.com/zendesk/answer_suggestion_app/pull/74.patch","issue_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/74","number":74,"state":"open","locked":false,"title":"[V2] Update API calls","user":{"login":"nick-f","id":754567,"avatar_url":"https://avatars2.githubusercontent.com/u/754567?v=3","gravatar_id":"","url":"https://api.github.com/users/nick-f","html_url":"https://github.com/nick-f","followers_url":"https://api.github.com/users/nick-f/followers","following_url":"https://api.github.com/users/nick-f/following{/other_user}","gists_url":"https://api.github.com/users/nick-f/gists{/gist_id}","starred_url":"https://api.github.com/users/nick-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick-f/subscriptions","organizations_url":"https://api.github.com/users/nick-f/orgs","repos_url":"https://api.github.com/users/nick-f/repos","events_url":"https://api.github.com/users/nick-f/events{/privacy}","received_events_url":"https://api.github.com/users/nick-f/received_events","type":"User","site_admin":false},"body":":v:\r\n\r\n/cc @zendesk/vegemite\r\n\r\n### Description\r\n\r\n#### Information on this PR\r\n\r\nUpdated the API calls to the v2 methods and async ways. Haven't yet updated the modal invocation (this will come later).\r\n\r\n#### Background\r\n(This section is copied from the [previous PR](https://github.com/zendesk/answer_suggestion_app/pull/73))\r\n\r\nIn order to get things reviewed before merging it all into master, the nickf/migrate-to-v2 branch will be the ersatz master that all of the other branches will be merged into. Once the migration is complete, nickf/migrate-to-v2 will be merged into master as v2.0\r\n\r\n### Risks\r\n\r\n[HIGH] Major upgrade to the app and using new API. Could affect feature set if not done correctly.","created_at":"2017-03-15T01:57:28Z","updated_at":"2017-03-17T05:42:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07dc98355debb3f68ad98500dc4696e71bee3f45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74/commits","review_comments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74/comments","review_comment_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/74/comments","statuses_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/statuses/717774c351945d45e83f496a3b64c25d73a0953a","head":{"label":"zendesk:nickf/v2-api-calls","ref":"nickf/v2-api-calls","sha":"717774c351945d45e83f496a3b64c25d73a0953a","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":10808894,"name":"answer_suggestion_app","full_name":"zendesk/answer_suggestion_app","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/answer_suggestion_app","description":"Answer Suggestion App","fork":false,"url":"https://api.github.com/repos/zendesk/answer_suggestion_app","forks_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/forks","keys_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/teams","hooks_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/hooks","issue_events_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/events","assignees_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/tags","blobs_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/languages","stargazers_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/stargazers","contributors_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/contributors","subscribers_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/subscribers","subscription_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/subscription","commits_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/merges","archive_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/downloads","issues_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/deployments","created_at":"2013-06-20T00:20:37Z","updated_at":"2016-12-21T15:16:04Z","pushed_at":"2017-03-17T04:05:40Z","git_url":"git://github.com/zendesk/answer_suggestion_app.git","ssh_url":"git@github.com:zendesk/answer_suggestion_app.git","clone_url":"https://github.com/zendesk/answer_suggestion_app.git","svn_url":"https://github.com/zendesk/answer_suggestion_app","homepage":null,"size":1520,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"zendesk:nickf/migrate-to-v2","ref":"nickf/migrate-to-v2","sha":"c14078481d1bdd5143dc3f3c3fc570fce6441ddb","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":10808894,"name":"answer_suggestion_app","full_name":"zendesk/answer_suggestion_app","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/answer_suggestion_app","description":"Answer Suggestion App","fork":false,"url":"https://api.github.com/repos/zendesk/answer_suggestion_app","forks_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/forks","keys_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/teams","hooks_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/hooks","issue_events_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/events","assignees_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/tags","blobs_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/languages","stargazers_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/stargazers","contributors_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/contributors","subscribers_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/subscribers","subscription_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/subscription","commits_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/merges","archive_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/downloads","issues_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/answer_suggestion_app/deployments","created_at":"2013-06-20T00:20:37Z","updated_at":"2016-12-21T15:16:04Z","pushed_at":"2017-03-17T04:05:40Z","git_url":"git://github.com/zendesk/answer_suggestion_app.git","ssh_url":"git@github.com:zendesk/answer_suggestion_app.git","clone_url":"https://github.com/zendesk/answer_suggestion_app.git","svn_url":"https://github.com/zendesk/answer_suggestion_app","homepage":null,"size":1520,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74"},"html":{"href":"https://github.com/zendesk/answer_suggestion_app/pull/74"},"issue":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/74"},"comments":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/answer_suggestion_app/statuses/717774c351945d45e83f496a3b64c25d73a0953a"}}}}
{"actor":{"display_login":"nick-f"}}