{"action":"created","comment":{"url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/comments/115154059","pull_request_review_id":36673401,"id":115154059,"diff_hunk":"@@ -16,22 +16,49 @@ function InputPlayer() {\n   return directive;\n }\n \n-InputPlayerCtrl.$inject = ['$rootScope', 'Constants', 'PlayerListService', 'SettingsService'];\n+InputPlayerCtrl.$inject = ['$rootScope', 'Constants', 'PlayerListService', 'SettingsService', 'The100Service'];\n \n-function InputPlayerCtrl($rootScope, Constants, PlayerListService, SettingsService) {\n+function InputPlayerCtrl($rootScope, Constants, PlayerListService, SettingsService, The100Service) {\n   const vm = this;\n \n   angular.extend(vm, {\n     pl: PlayerListService,\n-    ss: SettingsService\n+    ss: SettingsService,\n+    t100s: The100Service\n   });\n \n-  vm.add = add;\n+  vm.run = run;\n   vm.player = \"\";\n   vm.keyup = keyup;\n   vm.toggle = toggle;\n   vm.platform = getPlatformFromSettings();\n \n+    function run() {\n+        var input = vm.player;\n+\n+        var match;","path":"app/scripts/drsInputPlayer.directive.js","position":28,"original_position":28,"commit_id":"ebb6f430c7dad75b7769249a89bd1d57a76fe45f","original_commit_id":"a8eed7f6d90192d546cf0ff39f29119265a83088","user":{"login":"Mulchman","id":11757993,"avatar_url":"https://avatars0.githubusercontent.com/u/11757993?v=3","gravatar_id":"","url":"https://api.github.com/users/Mulchman","html_url":"https://github.com/Mulchman","followers_url":"https://api.github.com/users/Mulchman/followers","following_url":"https://api.github.com/users/Mulchman/following{/other_user}","gists_url":"https://api.github.com/users/Mulchman/gists{/gist_id}","starred_url":"https://api.github.com/users/Mulchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mulchman/subscriptions","organizations_url":"https://api.github.com/users/Mulchman/orgs","repos_url":"https://api.github.com/users/Mulchman/repos","events_url":"https://api.github.com/users/Mulchman/events{/privacy}","received_events_url":"https://api.github.com/users/Mulchman/received_events","type":"User","site_admin":false},"body":"Prefer let/const","created_at":"2017-05-07T21:08:26Z","updated_at":"2017-05-07T21:10:14Z","html_url":"https://github.com/Mulchman/DestinyRaidStatus/pull/14#discussion_r115154059","pull_request_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/comments/115154059"},"html":{"href":"https://github.com/Mulchman/DestinyRaidStatus/pull/14#discussion_r115154059"},"pull_request":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14","id":119330666,"html_url":"https://github.com/Mulchman/DestinyRaidStatus/pull/14","diff_url":"https://github.com/Mulchman/DestinyRaidStatus/pull/14.diff","patch_url":"https://github.com/Mulchman/DestinyRaidStatus/pull/14.patch","issue_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/14","number":14,"state":"open","locked":false,"title":"Scraping the100.io game gamertags from game link.","user":{"login":"michael-donat","id":1475740,"avatar_url":"https://avatars3.githubusercontent.com/u/1475740?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-donat","html_url":"https://github.com/michael-donat","followers_url":"https://api.github.com/users/michael-donat/followers","following_url":"https://api.github.com/users/michael-donat/following{/other_user}","gists_url":"https://api.github.com/users/michael-donat/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-donat/subscriptions","organizations_url":"https://api.github.com/users/michael-donat/orgs","repos_url":"https://api.github.com/users/michael-donat/repos","events_url":"https://api.github.com/users/michael-donat/events{/privacy}","received_events_url":"https://api.github.com/users/michael-donat/received_events","type":"User","site_admin":false},"body":"Summary of changes:\r\n\r\nThe Gamertag input is now an 'omnisearch' - it will recognise the100.io game link (`https://www.the100.io/game/967740`), regex match the game id and run a scrape against the100.io to get all gamertags. Once those are received it will add them in a loop reusing the `vm.add()` method that already existed.\r\n\r\nOne annoying factor is that because of cors and mime checking settings, there is no way to directly scrape the100.io from the browser, a server side component is needed.\r\n\r\nThis component is provided in `server/index.js` and has it's own `package.json`, will need to be installed and then ran (preferably using something like nodemon or pm2). By default it will bind itself to `:3000`\r\n\r\nThere's also been a change to cofig, the `apiKey.json` file now contains the100endpoint to look for a game (this is mostly for development, I will explain that below).\r\n\r\n#### So, how to deploy it all together?\r\n\r\n1. Client code / Extension\r\n\r\nNothing changes here, the current README instructions are still applicable, just build dist and chuck it out.\r\n\r\n2. Server code\r\n\r\nThis needs to be put in a place where you want to run it, `npm installed` and then `node run`. By default it will be on port 3000, but you can control it with `process.env.PORT`\r\n\r\nYou will then need to provide a proxyPass directive to your apache config, by default the client code is expecting to find info about gamertags under `http://destinyraidstatus.com/api/the100/game/:game` so what we want to do is make all requests to `http://destinyraidstatus.com/api/` to proxy to our node server process.\r\n\r\nNot sure how you have everything configured, but following should be a good start (assuming you are running that server component on port 3000):\r\n\r\nhttps://httpd.apache.org/docs/2.4/mod/mod_proxy.html\r\n\r\n```\r\nProxyPass \"/api\" \"http://127.0.0.1:3000/\"\r\n```\r\n\r\nSo we are simply looking at proxying a call from the client (`http://destinyraidstatus.com/api/the100/game/123123`) into a call that will go into our server component (`http://localhost:3000/api/the100/game/:game`), ProxyPass should do just this.\r\n\r\n#### For development?\r\n\r\nHere you just need to run the server component locally and then change apiKey.json and add that endpoint parameter to point to localhost, example below\r\n\r\n```\r\n{ \"apiKey\": \"\", \"the100endpoint\": \"http://127.0.0.1:3000/api/the100/game/\" }\r\n```\r\n\r\nThat should be all you need.\r\n\r\n\r\n[example](https://dl.dropboxusercontent.com/content_link/dQszVTP1M6qrhOMq0xl3ICveTxu7wRGZT6qLN29S1SqAxEksgpAtSwiKHksBZjSG/file)\r\n\r\n\r\n\r\n","created_at":"2017-05-07T08:27:33Z","updated_at":"2017-05-07T21:10:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99265ebf20c1203f95616af9080ea31311a1b644","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14/commits","review_comments_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14/comments","review_comment_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/14/comments","statuses_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/statuses/ebb6f430c7dad75b7769249a89bd1d57a76fe45f","head":{"label":"michael-donat:master","ref":"master","sha":"ebb6f430c7dad75b7769249a89bd1d57a76fe45f","user":{"login":"michael-donat","id":1475740,"avatar_url":"https://avatars3.githubusercontent.com/u/1475740?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-donat","html_url":"https://github.com/michael-donat","followers_url":"https://api.github.com/users/michael-donat/followers","following_url":"https://api.github.com/users/michael-donat/following{/other_user}","gists_url":"https://api.github.com/users/michael-donat/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-donat/subscriptions","organizations_url":"https://api.github.com/users/michael-donat/orgs","repos_url":"https://api.github.com/users/michael-donat/repos","events_url":"https://api.github.com/users/michael-donat/events{/privacy}","received_events_url":"https://api.github.com/users/michael-donat/received_events","type":"User","site_admin":false},"repo":{"id":90139808,"name":"DestinyRaidStatus","full_name":"michael-donat/DestinyRaidStatus","owner":{"login":"michael-donat","id":1475740,"avatar_url":"https://avatars3.githubusercontent.com/u/1475740?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-donat","html_url":"https://github.com/michael-donat","followers_url":"https://api.github.com/users/michael-donat/followers","following_url":"https://api.github.com/users/michael-donat/following{/other_user}","gists_url":"https://api.github.com/users/michael-donat/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-donat/subscriptions","organizations_url":"https://api.github.com/users/michael-donat/orgs","repos_url":"https://api.github.com/users/michael-donat/repos","events_url":"https://api.github.com/users/michael-donat/events{/privacy}","received_events_url":"https://api.github.com/users/michael-donat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michael-donat/DestinyRaidStatus","description":"Easily check raid status of Destiny player(s)","fork":true,"url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus","forks_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/forks","keys_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/teams","hooks_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/hooks","issue_events_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/issues/events{/number}","events_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/events","assignees_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/assignees{/user}","branches_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/branches{/branch}","tags_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/tags","blobs_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/git/refs{/sha}","trees_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/statuses/{sha}","languages_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/languages","stargazers_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/stargazers","contributors_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/contributors","subscribers_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/subscribers","subscription_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/subscription","commits_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/commits{/sha}","git_commits_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/git/commits{/sha}","comments_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/comments{/number}","issue_comment_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/issues/comments{/number}","contents_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/contents/{+path}","compare_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/merges","archive_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/downloads","issues_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/issues{/number}","pulls_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/pulls{/number}","milestones_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/milestones{/number}","notifications_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/labels{/name}","releases_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/releases{/id}","deployments_url":"https://api.github.com/repos/michael-donat/DestinyRaidStatus/deployments","created_at":"2017-05-03T11:04:28Z","updated_at":"2017-05-03T11:04:30Z","pushed_at":"2017-05-07T08:46:24Z","git_url":"git://github.com/michael-donat/DestinyRaidStatus.git","ssh_url":"git@github.com:michael-donat/DestinyRaidStatus.git","clone_url":"https://github.com/michael-donat/DestinyRaidStatus.git","svn_url":"https://github.com/michael-donat/DestinyRaidStatus","homepage":null,"size":112,"stargazers_count":0,"watchers_count":0,"language":"ApacheConf","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"Mulchman:master","ref":"master","sha":"86e3ae1ae801ae59d8c65888bb1249bada388d4c","user":{"login":"Mulchman","id":11757993,"avatar_url":"https://avatars0.githubusercontent.com/u/11757993?v=3","gravatar_id":"","url":"https://api.github.com/users/Mulchman","html_url":"https://github.com/Mulchman","followers_url":"https://api.github.com/users/Mulchman/followers","following_url":"https://api.github.com/users/Mulchman/following{/other_user}","gists_url":"https://api.github.com/users/Mulchman/gists{/gist_id}","starred_url":"https://api.github.com/users/Mulchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mulchman/subscriptions","organizations_url":"https://api.github.com/users/Mulchman/orgs","repos_url":"https://api.github.com/users/Mulchman/repos","events_url":"https://api.github.com/users/Mulchman/events{/privacy}","received_events_url":"https://api.github.com/users/Mulchman/received_events","type":"User","site_admin":false},"repo":{"id":89870718,"name":"DestinyRaidStatus","full_name":"Mulchman/DestinyRaidStatus","owner":{"login":"Mulchman","id":11757993,"avatar_url":"https://avatars0.githubusercontent.com/u/11757993?v=3","gravatar_id":"","url":"https://api.github.com/users/Mulchman","html_url":"https://github.com/Mulchman","followers_url":"https://api.github.com/users/Mulchman/followers","following_url":"https://api.github.com/users/Mulchman/following{/other_user}","gists_url":"https://api.github.com/users/Mulchman/gists{/gist_id}","starred_url":"https://api.github.com/users/Mulchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mulchman/subscriptions","organizations_url":"https://api.github.com/users/Mulchman/orgs","repos_url":"https://api.github.com/users/Mulchman/repos","events_url":"https://api.github.com/users/Mulchman/events{/privacy}","received_events_url":"https://api.github.com/users/Mulchman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mulchman/DestinyRaidStatus","description":"Easily check raid status of Destiny player(s)","fork":false,"url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus","forks_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/forks","keys_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/teams","hooks_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/hooks","issue_events_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/events{/number}","events_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/events","assignees_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/assignees{/user}","branches_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/branches{/branch}","tags_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/tags","blobs_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/statuses/{sha}","languages_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/languages","stargazers_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/stargazers","contributors_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/contributors","subscribers_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/subscribers","subscription_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/subscription","commits_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/contents/{+path}","compare_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/merges","archive_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/downloads","issues_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues{/number}","pulls_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls{/number}","milestones_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/milestones{/number}","notifications_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/labels{/name}","releases_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/releases{/id}","deployments_url":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/deployments","created_at":"2017-04-30T19:01:27Z","updated_at":"2017-05-02T21:33:16Z","pushed_at":"2017-05-07T08:46:26Z","git_url":"git://github.com/Mulchman/DestinyRaidStatus.git","ssh_url":"git@github.com:Mulchman/DestinyRaidStatus.git","clone_url":"https://github.com/Mulchman/DestinyRaidStatus.git","svn_url":"https://github.com/Mulchman/DestinyRaidStatus","homepage":null,"size":111,"stargazers_count":0,"watchers_count":0,"language":"ApacheConf","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14"},"html":{"href":"https://github.com/Mulchman/DestinyRaidStatus/pull/14"},"issue":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/14"},"comments":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/Mulchman/DestinyRaidStatus/statuses/ebb6f430c7dad75b7769249a89bd1d57a76fe45f"}}}}
{"actor":{"display_login":"Mulchman"}}