{"action":"created","comment":{"url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/comments/78388251","id":78388251,"diff_hunk":"@@ -289,6 +289,15 @@ function SpotifyWebHelper(opts) {\n \n       spotifyJsonRequest(this, '/remote/play.json', params, cb);\n     }\n+\n+    this.getVersion = function(cb) {\n+        var url = generateSpotifyUrl('/service/version.json');\n+        return getJson(url, { 'service': 'remote' }, ORIGIN_HEADER, cb)\n+    }\n+\n+    this.getLocalHostname = function() {\n+      return generateRandomLocalHostName();","path":"index.js","position":11,"original_position":11,"commit_id":"902e38f735eccb70de6304940762698ffd1f2133","original_commit_id":"902e38f735eccb70de6304940762698ffd1f2133","user":{"login":"nadavbar","id":2324293,"avatar_url":"https://avatars.githubusercontent.com/u/2324293?v=3","gravatar_id":"","url":"https://api.github.com/users/nadavbar","html_url":"https://github.com/nadavbar","followers_url":"https://api.github.com/users/nadavbar/followers","following_url":"https://api.github.com/users/nadavbar/following{/other_user}","gists_url":"https://api.github.com/users/nadavbar/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavbar/subscriptions","organizations_url":"https://api.github.com/users/nadavbar/orgs","repos_url":"https://api.github.com/users/nadavbar/repos","events_url":"https://api.github.com/users/nadavbar/events{/privacy}","received_events_url":"https://api.github.com/users/nadavbar/received_events","type":"User","site_admin":false},"body":"What is the scenario in which you need this to be exposed to the calling module? It's was hidden since it's an implementation depdendant field..","created_at":"2016-09-12T14:53:28Z","updated_at":"2016-09-12T14:53:28Z","html_url":"https://github.com/nadavbar/node-spotify-webhelper/pull/5#discussion_r78388251","pull_request_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/comments/78388251"},"html":{"href":"https://github.com/nadavbar/node-spotify-webhelper/pull/5#discussion_r78388251"},"pull_request":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5","id":84869038,"html_url":"https://github.com/nadavbar/node-spotify-webhelper/pull/5","diff_url":"https://github.com/nadavbar/node-spotify-webhelper/pull/5.diff","patch_url":"https://github.com/nadavbar/node-spotify-webhelper/pull/5.patch","issue_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/5","number":5,"state":"open","locked":false,"title":"getLocalHostname and getVersion apis","user":{"login":"loretoparisi","id":163333,"avatar_url":"https://avatars.githubusercontent.com/u/163333?v=3","gravatar_id":"","url":"https://api.github.com/users/loretoparisi","html_url":"https://github.com/loretoparisi","followers_url":"https://api.github.com/users/loretoparisi/followers","following_url":"https://api.github.com/users/loretoparisi/following{/other_user}","gists_url":"https://api.github.com/users/loretoparisi/gists{/gist_id}","starred_url":"https://api.github.com/users/loretoparisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loretoparisi/subscriptions","organizations_url":"https://api.github.com/users/loretoparisi/orgs","repos_url":"https://api.github.com/users/loretoparisi/repos","events_url":"https://api.github.com/users/loretoparisi/events{/privacy}","received_events_url":"https://api.github.com/users/loretoparisi/received_events","type":"User","site_admin":false},"body":"I have added two new api to get the `localhost` name for the `spotilocal` host protocol and the host current version of the application/protocol:\r\n\r\n```\r\n$ node\r\n> host=require('./index')\r\n{ SpotifyWebHelper: [Function: SpotifyWebHelper] }\r\n> wh=new host.SpotifyWebHelper()\r\nSpotifyWebHelper {\r\n  isInitialized: false,\r\n  init: [Function],\r\n  getStatus: [Function],\r\n  pause: [Function],\r\n  unpause: [Function],\r\n  play: [Function],\r\n  getVersion: [Function],\r\n  getLocalHostname: [Function] }\r\n> wh.getVersion(function(err,res) { console.log(res) })\r\n> { version: 9, client_version: '1.0.36.124.g1cba1920' }\r\n> wh.getLocalHostname()\r\n'gmosydwwlx.spotilocal.com'\r\n> \r\n```","created_at":"2016-09-12T13:16:02Z","updated_at":"2016-09-12T14:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"190e03f3d3869d30f91bbbf643ee51cfe46f7db9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5/commits","review_comments_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5/comments","review_comment_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/5/comments","statuses_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/statuses/902e38f735eccb70de6304940762698ffd1f2133","head":{"label":"loretoparisi:master","ref":"master","sha":"902e38f735eccb70de6304940762698ffd1f2133","user":{"login":"loretoparisi","id":163333,"avatar_url":"https://avatars.githubusercontent.com/u/163333?v=3","gravatar_id":"","url":"https://api.github.com/users/loretoparisi","html_url":"https://github.com/loretoparisi","followers_url":"https://api.github.com/users/loretoparisi/followers","following_url":"https://api.github.com/users/loretoparisi/following{/other_user}","gists_url":"https://api.github.com/users/loretoparisi/gists{/gist_id}","starred_url":"https://api.github.com/users/loretoparisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loretoparisi/subscriptions","organizations_url":"https://api.github.com/users/loretoparisi/orgs","repos_url":"https://api.github.com/users/loretoparisi/repos","events_url":"https://api.github.com/users/loretoparisi/events{/privacy}","received_events_url":"https://api.github.com/users/loretoparisi/received_events","type":"User","site_admin":false},"repo":{"id":68009829,"name":"node-spotify-webhelper","full_name":"loretoparisi/node-spotify-webhelper","owner":{"login":"loretoparisi","id":163333,"avatar_url":"https://avatars.githubusercontent.com/u/163333?v=3","gravatar_id":"","url":"https://api.github.com/users/loretoparisi","html_url":"https://github.com/loretoparisi","followers_url":"https://api.github.com/users/loretoparisi/followers","following_url":"https://api.github.com/users/loretoparisi/following{/other_user}","gists_url":"https://api.github.com/users/loretoparisi/gists{/gist_id}","starred_url":"https://api.github.com/users/loretoparisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loretoparisi/subscriptions","organizations_url":"https://api.github.com/users/loretoparisi/orgs","repos_url":"https://api.github.com/users/loretoparisi/repos","events_url":"https://api.github.com/users/loretoparisi/events{/privacy}","received_events_url":"https://api.github.com/users/loretoparisi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/loretoparisi/node-spotify-webhelper","description":"node.js client library for Spotify WebHelper API","fork":true,"url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper","forks_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/forks","keys_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/teams","hooks_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/hooks","issue_events_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/issues/events{/number}","events_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/events","assignees_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/assignees{/user}","branches_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/branches{/branch}","tags_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/tags","blobs_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/git/refs{/sha}","trees_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/statuses/{sha}","languages_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/languages","stargazers_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/stargazers","contributors_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/contributors","subscribers_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/subscribers","subscription_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/subscription","commits_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/commits{/sha}","git_commits_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/git/commits{/sha}","comments_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/comments{/number}","issue_comment_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/issues/comments{/number}","contents_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/contents/{+path}","compare_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/merges","archive_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/downloads","issues_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/issues{/number}","pulls_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/pulls{/number}","milestones_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/milestones{/number}","notifications_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/labels{/name}","releases_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/releases{/id}","deployments_url":"https://api.github.com/repos/loretoparisi/node-spotify-webhelper/deployments","created_at":"2016-09-12T13:09:38Z","updated_at":"2016-09-12T13:09:40Z","pushed_at":"2016-09-12T13:13:55Z","git_url":"git://github.com/loretoparisi/node-spotify-webhelper.git","ssh_url":"git@github.com:loretoparisi/node-spotify-webhelper.git","clone_url":"https://github.com/loretoparisi/node-spotify-webhelper.git","svn_url":"https://github.com/loretoparisi/node-spotify-webhelper","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"master"}},"base":{"label":"nadavbar:master","ref":"master","sha":"1998a7c4c1b87211406b2a42c291aee1bfe78d71","user":{"login":"nadavbar","id":2324293,"avatar_url":"https://avatars.githubusercontent.com/u/2324293?v=3","gravatar_id":"","url":"https://api.github.com/users/nadavbar","html_url":"https://github.com/nadavbar","followers_url":"https://api.github.com/users/nadavbar/followers","following_url":"https://api.github.com/users/nadavbar/following{/other_user}","gists_url":"https://api.github.com/users/nadavbar/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavbar/subscriptions","organizations_url":"https://api.github.com/users/nadavbar/orgs","repos_url":"https://api.github.com/users/nadavbar/repos","events_url":"https://api.github.com/users/nadavbar/events{/privacy}","received_events_url":"https://api.github.com/users/nadavbar/received_events","type":"User","site_admin":false},"repo":{"id":20859463,"name":"node-spotify-webhelper","full_name":"nadavbar/node-spotify-webhelper","owner":{"login":"nadavbar","id":2324293,"avatar_url":"https://avatars.githubusercontent.com/u/2324293?v=3","gravatar_id":"","url":"https://api.github.com/users/nadavbar","html_url":"https://github.com/nadavbar","followers_url":"https://api.github.com/users/nadavbar/followers","following_url":"https://api.github.com/users/nadavbar/following{/other_user}","gists_url":"https://api.github.com/users/nadavbar/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavbar/subscriptions","organizations_url":"https://api.github.com/users/nadavbar/orgs","repos_url":"https://api.github.com/users/nadavbar/repos","events_url":"https://api.github.com/users/nadavbar/events{/privacy}","received_events_url":"https://api.github.com/users/nadavbar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nadavbar/node-spotify-webhelper","description":"node.js client library for Spotify WebHelper API","fork":false,"url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper","forks_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/forks","keys_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/teams","hooks_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/hooks","issue_events_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/events{/number}","events_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/events","assignees_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/assignees{/user}","branches_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/branches{/branch}","tags_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/tags","blobs_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/git/refs{/sha}","trees_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/statuses/{sha}","languages_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/languages","stargazers_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/stargazers","contributors_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/contributors","subscribers_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/subscribers","subscription_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/subscription","commits_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/commits{/sha}","git_commits_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/git/commits{/sha}","comments_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/comments{/number}","issue_comment_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/comments{/number}","contents_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/contents/{+path}","compare_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/merges","archive_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/downloads","issues_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues{/number}","pulls_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls{/number}","milestones_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/milestones{/number}","notifications_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/labels{/name}","releases_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/releases{/id}","deployments_url":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/deployments","created_at":"2014-06-15T16:15:23Z","updated_at":"2016-09-04T18:32:54Z","pushed_at":"2016-09-12T13:16:02Z","git_url":"git://github.com/nadavbar/node-spotify-webhelper.git","ssh_url":"git@github.com:nadavbar/node-spotify-webhelper.git","clone_url":"https://github.com/nadavbar/node-spotify-webhelper.git","svn_url":"https://github.com/nadavbar/node-spotify-webhelper","homepage":null,"size":5,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5"},"html":{"href":"https://github.com/nadavbar/node-spotify-webhelper/pull/5"},"issue":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/5"},"comments":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/nadavbar/node-spotify-webhelper/statuses/902e38f735eccb70de6304940762698ffd1f2133"}}}}
{"actor":{"display_login":"nadavbar"}}