{"action":"created","comment":{"url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/comments/38952559","id":38952559,"diff_hunk":"@@ -186,6 +186,86 @@ app.service('SCapiService', function($http, $window, $q, $log, $state, $statePar\n     };\n \n     /**\n+     * Responsible to get track details\n+     * @return {[object]} data response\n+     */\n+    this.getTrackDetails = function(songId) {\n+        var url = 'https://api.soundcloud.com/tracks/' + songId + '.json?&oauth_token=' + $window.scAccessToken,\n+            that = this;\n+        return $http.get(url)\n+            .then(function(response) {\n+                if (typeof response.data === 'object') {\n+                    return response.data;\n+                } else {\n+                    // invalid response\n+                    return $q.reject(response.data);\n+                }\n+\n+            }, function(response) {\n+                // something went wrong\n+                return $q.reject(response.data);\n+            });\n+    };\n+\n+\n+    /**\n+     * Responsible to get comments for track\n+     * @return {[object]} data response\n+     */\n+    this.getTrackComments = function(songId) {\n+        var url = 'https://api.soundcloud.com/tracks/' + songId + '/comments.json?linked_partitioning=1&limit=30&oauth_token=' + $window.scAccessToken,\n+            that = this;\n+        return $http.get(url)\n+            .then(function(response) {\n+                if (typeof response.data === 'object') {\n+                    if ( response.data.next_href !== null || response.data.next_href !== undefined ) {\n+                        that.next_page = response.data.next_href;\n+                    }\n+                    return response.data;\n+                } else {\n+                    // invalid response\n+                    return $q.reject(response.data);\n+                }\n+\n+            }, function(response) {\n+                // something went wrong\n+                return $q.reject(response.data);\n+            });\n+    };\n+\n+    /**\n+     * Responsible to get user favorite tracks ids\n+     * @return {[object]} data response\n+     */\n+    this.getFavoritesIds = function(next_href) {","path":"app/public/js/common/SCapiService.js","position":55,"original_position":55,"commit_id":"70a7c8778f0156e6f4561365bfd3d704f7df6f99","original_commit_id":"70a7c8778f0156e6f4561365bfd3d704f7df6f99","user":{"login":"weblancaster","id":549394,"avatar_url":"https://avatars.githubusercontent.com/u/549394?v=3","gravatar_id":"","url":"https://api.github.com/users/weblancaster","html_url":"https://github.com/weblancaster","followers_url":"https://api.github.com/users/weblancaster/followers","following_url":"https://api.github.com/users/weblancaster/following{/other_user}","gists_url":"https://api.github.com/users/weblancaster/gists{/gist_id}","starred_url":"https://api.github.com/users/weblancaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weblancaster/subscriptions","organizations_url":"https://api.github.com/users/weblancaster/orgs","repos_url":"https://api.github.com/users/weblancaster/repos","events_url":"https://api.github.com/users/weblancaster/events{/privacy}","received_events_url":"https://api.github.com/users/weblancaster/received_events","type":"User","site_admin":false},"body":"The API response comes with `user_favorite` so let's just use that.. if it's null or empty nothing will happen, no need to all that extra work/code.","created_at":"2015-09-08T17:14:32Z","updated_at":"2015-09-08T17:14:32Z","html_url":"https://github.com/Soundnode/soundnode-app/pull/340#discussion_r38952559","pull_request_url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340","_links":{"self":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/comments/38952559"},"html":{"href":"https://github.com/Soundnode/soundnode-app/pull/340#discussion_r38952559"},"pull_request":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340"}}},"pull_request":{"url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340","id":43934499,"html_url":"https://github.com/Soundnode/soundnode-app/pull/340","diff_url":"https://github.com/Soundnode/soundnode-app/pull/340.diff","patch_url":"https://github.com/Soundnode/soundnode-app/pull/340.patch","issue_url":"https://api.github.com/repos/Soundnode/soundnode-app/issues/340","number":340,"state":"open","locked":false,"title":"Add view for tracks, simplier tracks view, rework directives...","user":{"login":"Pitros","id":6910670,"avatar_url":"https://avatars.githubusercontent.com/u/6910670?v=3","gravatar_id":"","url":"https://api.github.com/users/Pitros","html_url":"https://github.com/Pitros","followers_url":"https://api.github.com/users/Pitros/followers","following_url":"https://api.github.com/users/Pitros/following{/other_user}","gists_url":"https://api.github.com/users/Pitros/gists{/gist_id}","starred_url":"https://api.github.com/users/Pitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pitros/subscriptions","organizations_url":"https://api.github.com/users/Pitros/orgs","repos_url":"https://api.github.com/users/Pitros/repos","events_url":"https://api.github.com/users/Pitros/events{/privacy}","received_events_url":"https://api.github.com/users/Pitros/received_events","type":"User","site_admin":false},"body":"Okay, so it's big commit, It should be split into separate ones, but I changed files so bad that everything needs to be pushed at once.\r\n\r\nChanges:\r\n1. Added track view with comments #335 \r\n2. Tracks view is now simplier #336\r\n3. Rewrote `show more` button behavior\r\n4. Improved `like` button behavior - now you can like and unlike tracks without reloading \r\n5. Liked tracks are now marked as liked\r\n6. Smaller css fixes (followings view, container padding)\r\n7. Submiting search by pressing enter now hides dropdown\r\n\r\nBecause it's one commit, if something needs to be removed or changed because You don't like it etc. I'll just change commit on my branch.\r\n\r\nScreenshots:\r\n![image](https://cloud.githubusercontent.com/assets/6910670/9618719/39426646-5109-11e5-881b-83c43c72654b.png)\r\n![image](https://cloud.githubusercontent.com/assets/6910670/9618727/577cfaf4-5109-11e5-92a8-af291a71cdc6.png)\r\n![image](https://cloud.githubusercontent.com/assets/6910670/9618734/66d0b0e0-5109-11e5-910a-3dad24fa5e3b.png)","created_at":"2015-09-01T22:28:51Z","updated_at":"2015-09-08T17:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13541f0674141e2019ad574fb22efb03dd12d19c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340/commits","review_comments_url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340/comments","review_comment_url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Soundnode/soundnode-app/issues/340/comments","statuses_url":"https://api.github.com/repos/Soundnode/soundnode-app/statuses/70a7c8778f0156e6f4561365bfd3d704f7df6f99","head":{"label":"Pitros:many-changes","ref":"many-changes","sha":"70a7c8778f0156e6f4561365bfd3d704f7df6f99","user":{"login":"Pitros","id":6910670,"avatar_url":"https://avatars.githubusercontent.com/u/6910670?v=3","gravatar_id":"","url":"https://api.github.com/users/Pitros","html_url":"https://github.com/Pitros","followers_url":"https://api.github.com/users/Pitros/followers","following_url":"https://api.github.com/users/Pitros/following{/other_user}","gists_url":"https://api.github.com/users/Pitros/gists{/gist_id}","starred_url":"https://api.github.com/users/Pitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pitros/subscriptions","organizations_url":"https://api.github.com/users/Pitros/orgs","repos_url":"https://api.github.com/users/Pitros/repos","events_url":"https://api.github.com/users/Pitros/events{/privacy}","received_events_url":"https://api.github.com/users/Pitros/received_events","type":"User","site_admin":false},"repo":{"id":41148713,"name":"soundnode-app","full_name":"Pitros/soundnode-app","owner":{"login":"Pitros","id":6910670,"avatar_url":"https://avatars.githubusercontent.com/u/6910670?v=3","gravatar_id":"","url":"https://api.github.com/users/Pitros","html_url":"https://github.com/Pitros","followers_url":"https://api.github.com/users/Pitros/followers","following_url":"https://api.github.com/users/Pitros/following{/other_user}","gists_url":"https://api.github.com/users/Pitros/gists{/gist_id}","starred_url":"https://api.github.com/users/Pitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pitros/subscriptions","organizations_url":"https://api.github.com/users/Pitros/orgs","repos_url":"https://api.github.com/users/Pitros/repos","events_url":"https://api.github.com/users/Pitros/events{/privacy}","received_events_url":"https://api.github.com/users/Pitros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pitros/soundnode-app","description":"Soundnode App is the Soundcloud for desktop. Built with Node-Webkit, AngularJS and consuming Soundcloud API.","fork":true,"url":"https://api.github.com/repos/Pitros/soundnode-app","forks_url":"https://api.github.com/repos/Pitros/soundnode-app/forks","keys_url":"https://api.github.com/repos/Pitros/soundnode-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pitros/soundnode-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pitros/soundnode-app/teams","hooks_url":"https://api.github.com/repos/Pitros/soundnode-app/hooks","issue_events_url":"https://api.github.com/repos/Pitros/soundnode-app/issues/events{/number}","events_url":"https://api.github.com/repos/Pitros/soundnode-app/events","assignees_url":"https://api.github.com/repos/Pitros/soundnode-app/assignees{/user}","branches_url":"https://api.github.com/repos/Pitros/soundnode-app/branches{/branch}","tags_url":"https://api.github.com/repos/Pitros/soundnode-app/tags","blobs_url":"https://api.github.com/repos/Pitros/soundnode-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pitros/soundnode-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pitros/soundnode-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pitros/soundnode-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pitros/soundnode-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Pitros/soundnode-app/languages","stargazers_url":"https://api.github.com/repos/Pitros/soundnode-app/stargazers","contributors_url":"https://api.github.com/repos/Pitros/soundnode-app/contributors","subscribers_url":"https://api.github.com/repos/Pitros/soundnode-app/subscribers","subscription_url":"https://api.github.com/repos/Pitros/soundnode-app/subscription","commits_url":"https://api.github.com/repos/Pitros/soundnode-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pitros/soundnode-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pitros/soundnode-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pitros/soundnode-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pitros/soundnode-app/contents/{+path}","compare_url":"https://api.github.com/repos/Pitros/soundnode-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pitros/soundnode-app/merges","archive_url":"https://api.github.com/repos/Pitros/soundnode-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pitros/soundnode-app/downloads","issues_url":"https://api.github.com/repos/Pitros/soundnode-app/issues{/number}","pulls_url":"https://api.github.com/repos/Pitros/soundnode-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Pitros/soundnode-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Pitros/soundnode-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pitros/soundnode-app/labels{/name}","releases_url":"https://api.github.com/repos/Pitros/soundnode-app/releases{/id}","created_at":"2015-08-21T09:52:25Z","updated_at":"2015-08-21T09:52:26Z","pushed_at":"2015-09-01T22:19:34Z","git_url":"git://github.com/Pitros/soundnode-app.git","ssh_url":"git@github.com:Pitros/soundnode-app.git","clone_url":"https://github.com/Pitros/soundnode-app.git","svn_url":"https://github.com/Pitros/soundnode-app","homepage":"www.soundnodeapp.com","size":324506,"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":"Soundnode:master","ref":"master","sha":"0feed4f5231ea10e2bca7a6e0b468f5e5aae47fd","user":{"login":"Soundnode","id":7566474,"avatar_url":"https://avatars.githubusercontent.com/u/7566474?v=3","gravatar_id":"","url":"https://api.github.com/users/Soundnode","html_url":"https://github.com/Soundnode","followers_url":"https://api.github.com/users/Soundnode/followers","following_url":"https://api.github.com/users/Soundnode/following{/other_user}","gists_url":"https://api.github.com/users/Soundnode/gists{/gist_id}","starred_url":"https://api.github.com/users/Soundnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soundnode/subscriptions","organizations_url":"https://api.github.com/users/Soundnode/orgs","repos_url":"https://api.github.com/users/Soundnode/repos","events_url":"https://api.github.com/users/Soundnode/events{/privacy}","received_events_url":"https://api.github.com/users/Soundnode/received_events","type":"Organization","site_admin":false},"repo":{"id":19158009,"name":"soundnode-app","full_name":"Soundnode/soundnode-app","owner":{"login":"Soundnode","id":7566474,"avatar_url":"https://avatars.githubusercontent.com/u/7566474?v=3","gravatar_id":"","url":"https://api.github.com/users/Soundnode","html_url":"https://github.com/Soundnode","followers_url":"https://api.github.com/users/Soundnode/followers","following_url":"https://api.github.com/users/Soundnode/following{/other_user}","gists_url":"https://api.github.com/users/Soundnode/gists{/gist_id}","starred_url":"https://api.github.com/users/Soundnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soundnode/subscriptions","organizations_url":"https://api.github.com/users/Soundnode/orgs","repos_url":"https://api.github.com/users/Soundnode/repos","events_url":"https://api.github.com/users/Soundnode/events{/privacy}","received_events_url":"https://api.github.com/users/Soundnode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Soundnode/soundnode-app","description":"Soundnode App is the Soundcloud for desktop. Built with NW.js, Angular.js and Soundcloud API.","fork":false,"url":"https://api.github.com/repos/Soundnode/soundnode-app","forks_url":"https://api.github.com/repos/Soundnode/soundnode-app/forks","keys_url":"https://api.github.com/repos/Soundnode/soundnode-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Soundnode/soundnode-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Soundnode/soundnode-app/teams","hooks_url":"https://api.github.com/repos/Soundnode/soundnode-app/hooks","issue_events_url":"https://api.github.com/repos/Soundnode/soundnode-app/issues/events{/number}","events_url":"https://api.github.com/repos/Soundnode/soundnode-app/events","assignees_url":"https://api.github.com/repos/Soundnode/soundnode-app/assignees{/user}","branches_url":"https://api.github.com/repos/Soundnode/soundnode-app/branches{/branch}","tags_url":"https://api.github.com/repos/Soundnode/soundnode-app/tags","blobs_url":"https://api.github.com/repos/Soundnode/soundnode-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Soundnode/soundnode-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Soundnode/soundnode-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Soundnode/soundnode-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Soundnode/soundnode-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Soundnode/soundnode-app/languages","stargazers_url":"https://api.github.com/repos/Soundnode/soundnode-app/stargazers","contributors_url":"https://api.github.com/repos/Soundnode/soundnode-app/contributors","subscribers_url":"https://api.github.com/repos/Soundnode/soundnode-app/subscribers","subscription_url":"https://api.github.com/repos/Soundnode/soundnode-app/subscription","commits_url":"https://api.github.com/repos/Soundnode/soundnode-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Soundnode/soundnode-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Soundnode/soundnode-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Soundnode/soundnode-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Soundnode/soundnode-app/contents/{+path}","compare_url":"https://api.github.com/repos/Soundnode/soundnode-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Soundnode/soundnode-app/merges","archive_url":"https://api.github.com/repos/Soundnode/soundnode-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Soundnode/soundnode-app/downloads","issues_url":"https://api.github.com/repos/Soundnode/soundnode-app/issues{/number}","pulls_url":"https://api.github.com/repos/Soundnode/soundnode-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Soundnode/soundnode-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Soundnode/soundnode-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Soundnode/soundnode-app/labels{/name}","releases_url":"https://api.github.com/repos/Soundnode/soundnode-app/releases{/id}","created_at":"2014-04-25T19:30:09Z","updated_at":"2015-09-08T01:37:53Z","pushed_at":"2015-09-08T16:33:44Z","git_url":"git://github.com/Soundnode/soundnode-app.git","ssh_url":"git@github.com:Soundnode/soundnode-app.git","clone_url":"https://github.com/Soundnode/soundnode-app.git","svn_url":"https://github.com/Soundnode/soundnode-app","homepage":"http://www.soundnodeapp.com","size":326834,"stargazers_count":340,"watchers_count":340,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":40,"forks":56,"open_issues":40,"watchers":340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340"},"html":{"href":"https://github.com/Soundnode/soundnode-app/pull/340"},"issue":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/issues/340"},"comments":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/issues/340/comments"},"review_comments":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340/comments"},"review_comment":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/pulls/340/commits"},"statuses":{"href":"https://api.github.com/repos/Soundnode/soundnode-app/statuses/70a7c8778f0156e6f4561365bfd3d704f7df6f99"}}}}