{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/universal-search/issues/166","repository_url":"https://api.github.com/repos/mozilla/universal-search","labels_url":"https://api.github.com/repos/mozilla/universal-search/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/universal-search/issues/166/comments","events_url":"https://api.github.com/repos/mozilla/universal-search/issues/166/events","html_url":"https://github.com/mozilla/universal-search/pull/166","id":152457031,"number":166,"title":"Shows recommendations only for predefined result types (closes #165).","user":{"login":"chuckharmston","id":23885,"avatar_url":"https://avatars.githubusercontent.com/u/23885?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckharmston","html_url":"https://github.com/chuckharmston","followers_url":"https://api.github.com/users/chuckharmston/followers","following_url":"https://api.github.com/users/chuckharmston/following{/other_user}","gists_url":"https://api.github.com/users/chuckharmston/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckharmston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckharmston/subscriptions","organizations_url":"https://api.github.com/users/chuckharmston/orgs","repos_url":"https://api.github.com/users/chuckharmston/repos","events_url":"https://api.github.com/users/chuckharmston/events{/privacy}","received_events_url":"https://api.github.com/users/chuckharmston/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/universal-search/labels/needs:review","name":"needs:review","color":"5319e7"},{"url":"https://api.github.com/repos/mozilla/universal-search/labels/status:under%20review","name":"status:under review","color":"444444"}],"state":"closed","locked":false,"assignee":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-05-01T21:46:56Z","updated_at":"2016-05-02T17:38:16Z","closed_at":"2016-05-02T17:38:16Z","pull_request":{"url":"https://api.github.com/repos/mozilla/universal-search/pulls/166","html_url":"https://github.com/mozilla/universal-search/pull/166","diff_url":"https://github.com/mozilla/universal-search/pull/166.diff","patch_url":"https://github.com/mozilla/universal-search/pull/166.patch"},"body":"- [x] Create a formal interface/base for a \"result type\" class, which should serve a similar purpose to the current `RecommendationRow` class.\r\n- [x] Create Wikipedia and TLD result type classes.\r\n- [x] Attach result type classes to an object in the app namespace.\r\n- [x] Add a method to the `RecommendationServer` class that negotiates for and returns the appropriate result type class or `null`.\r\n- [x] Refactor `RecommendationServer.search` to only publish the `recommendation` event if that method returns a truthy value.\r\n- [x] Refactor `RecommendationServer.search` to include the appropriate result type class in the event payload.\r\n- [x] Refactor `Recommendation.show` to use the result type class from the event payload when rendering.\r\n\r\nr? @6a68 \r\n\r\nThis needs heavy review and some cleanup, but I wanted to get the approach in front of your eyes sooner than later.\r\n\r\nUse in combination with the PR here: https://github.com/mozilla/universal-search-recommendation/pull/118"},"comment":{"url":"https://api.github.com/repos/mozilla/universal-search/issues/comments/216305359","html_url":"https://github.com/mozilla/universal-search/pull/166#issuecomment-216305359","issue_url":"https://api.github.com/repos/mozilla/universal-search/issues/166","id":216305359,"user":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T17:38:16Z","updated_at":"2016-05-02T17:38:16Z","body":"Closing, per convo in #165"}}