{"action":"created","comment":{"url":"https://api.github.com/repos/andela/suyabay/pulls/comments/65366170","id":65366170,"diff_hunk":"@@ -0,0 +1,38 @@\n+<?php ","path":"app/Http/Transformers/UserCommentTransformer.php","position":1,"original_position":1,"commit_id":"a2da62f153b55572035abb19446eda7e9bf1da49","original_commit_id":"a2da62f153b55572035abb19446eda7e9bf1da49","user":{"login":"Nitpick-CI","id":12626182,"avatar_url":"https://avatars.githubusercontent.com/u/12626182?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitpick-CI","html_url":"https://github.com/Nitpick-CI","followers_url":"https://api.github.com/users/Nitpick-CI/followers","following_url":"https://api.github.com/users/Nitpick-CI/following{/other_user}","gists_url":"https://api.github.com/users/Nitpick-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitpick-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitpick-CI/subscriptions","organizations_url":"https://api.github.com/users/Nitpick-CI/orgs","repos_url":"https://api.github.com/users/Nitpick-CI/repos","events_url":"https://api.github.com/users/Nitpick-CI/events{/privacy}","received_events_url":"https://api.github.com/users/Nitpick-CI/received_events","type":"User","site_admin":false},"body":"Whitespace found at end of line","created_at":"2016-06-01T14:05:24Z","updated_at":"2016-06-01T14:05:24Z","html_url":"https://github.com/andela/suyabay/pull/298#discussion_r65366170","pull_request_url":"https://api.github.com/repos/andela/suyabay/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/andela/suyabay/pulls/comments/65366170"},"html":{"href":"https://github.com/andela/suyabay/pull/298#discussion_r65366170"},"pull_request":{"href":"https://api.github.com/repos/andela/suyabay/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/andela/suyabay/pulls/298","id":72186544,"html_url":"https://github.com/andela/suyabay/pull/298","diff_url":"https://github.com/andela/suyabay/pull/298.diff","patch_url":"https://github.com/andela/suyabay/pull/298.patch","issue_url":"https://api.github.com/repos/andela/suyabay/issues/298","number":298,"state":"open","locked":false,"title":" [#120546921] Create endpoint that retrieves the comments of a specified user ","user":{"login":"andela-araimi","id":14159420,"avatar_url":"https://avatars.githubusercontent.com/u/14159420?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-araimi","html_url":"https://github.com/andela-araimi","followers_url":"https://api.github.com/users/andela-araimi/followers","following_url":"https://api.github.com/users/andela-araimi/following{/other_user}","gists_url":"https://api.github.com/users/andela-araimi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-araimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-araimi/subscriptions","organizations_url":"https://api.github.com/users/andela-araimi/orgs","repos_url":"https://api.github.com/users/andela-araimi/repos","events_url":"https://api.github.com/users/andela-araimi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-araimi/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\n- Write an endpoint that retrieves the comments of a particular user\r\n- Leverage on the endpoint to retrieve the comment base on the query passed\r\n\r\n#### Description of Task to be completed?\r\n\r\n- Create a route `/v1/users/:name/comments` that calls the method `getUserComment` in the `CommentController`\r\n-  Create `getUserComment` method to implement the user comments retrieval\r\n-  Create two methods `displayUserComment` and `displayUserCommentsByDate` that returns the data leveraging on the userTransformer including the CommentTransformer\r\n-  Use the userTransformer  to transform the user result\r\n-  Write tests that assert that;\r\n-  The user does not exist if the userName passed is invalid for the user with status code 404.\r\n-  The comments of the user are retrieved with status code 200.\r\n\r\n#### How should this be manually tested?\r\n\r\n- We need POSTMAN for this to be manually tested, POSTMAN is an extension plugin on google chrome.\r\n-  To retrieve the comments of the user,  send a `GET` request with this endpoint  ` http://suyabay.app/api/v1/users/{name}/comments`. If the {users} is invalid, you should see a JSON response `The user does not exist`, status code `404`. If the {users} is valid, but there is no comments made by the user, you should see a JSON response `Comment not available for this user`, status code `404`. If the {users} is valid and the user has  comments, you should get all the comments made by the user with status code`200`.\r\n-  To retrieve all comments made  the user with specified date,  send a `GET` request with this endpoint  ` suyabay.app/api/v1/users/dehmohlah/comments?fromDate=2016-05-10&toDate=2016-05-18 `. If the {username} is valid, you should see a JSON response with the comments requested from the recent comment to the oldest commence, a status code of `200`. If you add a limit, to the query like so:       `suyabay.app/api/v1/users/dehmohlah/comments?fromDate=2016-05-10&toDate=2016-05-18&limi=2 `. If the {episode-name} is valid, you should see a JSON response with the comments requested from the recent comment to the oldest commence with the limit of 2, status code of `200`.\r\n\r\n#### Any background context you want to provide?\r\n\r\nNone\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n\r\n- #120180435\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n\r\n\r\n#### Questions:\r\n[@unicodeveloper](https://github.com/unicodeveloper)\r\n[@andela-oadebayo](https://github.com/andela-oadebayo)","created_at":"2016-06-01T14:05:13Z","updated_at":"2016-06-01T14:05:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cdc493b018e241e5c8eecea94ffc9429a7e80c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andela/suyabay/pulls/298/commits","review_comments_url":"https://api.github.com/repos/andela/suyabay/pulls/298/comments","review_comment_url":"https://api.github.com/repos/andela/suyabay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/suyabay/issues/298/comments","statuses_url":"https://api.github.com/repos/andela/suyabay/statuses/a2da62f153b55572035abb19446eda7e9bf1da49","head":{"label":"andela:ft-create-endpoint-that-retrieves-the-comments-of-a-specified-user-#120546921","ref":"ft-create-endpoint-that-retrieves-the-comments-of-a-specified-user-#120546921","sha":"a2da62f153b55572035abb19446eda7e9bf1da49","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":41855319,"name":"suyabay","full_name":"andela/suyabay","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/suyabay","description":"Awesome Podcast FM Network for Suya Lovers","fork":false,"url":"https://api.github.com/repos/andela/suyabay","forks_url":"https://api.github.com/repos/andela/suyabay/forks","keys_url":"https://api.github.com/repos/andela/suyabay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/suyabay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/suyabay/teams","hooks_url":"https://api.github.com/repos/andela/suyabay/hooks","issue_events_url":"https://api.github.com/repos/andela/suyabay/issues/events{/number}","events_url":"https://api.github.com/repos/andela/suyabay/events","assignees_url":"https://api.github.com/repos/andela/suyabay/assignees{/user}","branches_url":"https://api.github.com/repos/andela/suyabay/branches{/branch}","tags_url":"https://api.github.com/repos/andela/suyabay/tags","blobs_url":"https://api.github.com/repos/andela/suyabay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/suyabay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/suyabay/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/suyabay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/suyabay/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/suyabay/languages","stargazers_url":"https://api.github.com/repos/andela/suyabay/stargazers","contributors_url":"https://api.github.com/repos/andela/suyabay/contributors","subscribers_url":"https://api.github.com/repos/andela/suyabay/subscribers","subscription_url":"https://api.github.com/repos/andela/suyabay/subscription","commits_url":"https://api.github.com/repos/andela/suyabay/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/suyabay/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/suyabay/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/suyabay/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/suyabay/contents/{+path}","compare_url":"https://api.github.com/repos/andela/suyabay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/suyabay/merges","archive_url":"https://api.github.com/repos/andela/suyabay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/suyabay/downloads","issues_url":"https://api.github.com/repos/andela/suyabay/issues{/number}","pulls_url":"https://api.github.com/repos/andela/suyabay/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/suyabay/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/suyabay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/suyabay/labels{/name}","releases_url":"https://api.github.com/repos/andela/suyabay/releases{/id}","deployments_url":"https://api.github.com/repos/andela/suyabay/deployments","created_at":"2015-09-03T11:00:56Z","updated_at":"2016-03-11T18:32:31Z","pushed_at":"2016-06-01T14:05:14Z","git_url":"git://github.com/andela/suyabay.git","ssh_url":"git@github.com:andela/suyabay.git","clone_url":"https://github.com/andela/suyabay.git","svn_url":"https://github.com/andela/suyabay","homepage":"https://suyabay-staging.herokuapp.com","size":35780,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":8,"default_branch":"staging"}},"base":{"label":"andela:staging","ref":"staging","sha":"2f9f9fc8e965f47e8a1315611c789ef80f7c1d25","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":41855319,"name":"suyabay","full_name":"andela/suyabay","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/suyabay","description":"Awesome Podcast FM Network for Suya Lovers","fork":false,"url":"https://api.github.com/repos/andela/suyabay","forks_url":"https://api.github.com/repos/andela/suyabay/forks","keys_url":"https://api.github.com/repos/andela/suyabay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/suyabay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/suyabay/teams","hooks_url":"https://api.github.com/repos/andela/suyabay/hooks","issue_events_url":"https://api.github.com/repos/andela/suyabay/issues/events{/number}","events_url":"https://api.github.com/repos/andela/suyabay/events","assignees_url":"https://api.github.com/repos/andela/suyabay/assignees{/user}","branches_url":"https://api.github.com/repos/andela/suyabay/branches{/branch}","tags_url":"https://api.github.com/repos/andela/suyabay/tags","blobs_url":"https://api.github.com/repos/andela/suyabay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/suyabay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/suyabay/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/suyabay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/suyabay/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/suyabay/languages","stargazers_url":"https://api.github.com/repos/andela/suyabay/stargazers","contributors_url":"https://api.github.com/repos/andela/suyabay/contributors","subscribers_url":"https://api.github.com/repos/andela/suyabay/subscribers","subscription_url":"https://api.github.com/repos/andela/suyabay/subscription","commits_url":"https://api.github.com/repos/andela/suyabay/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/suyabay/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/suyabay/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/suyabay/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/suyabay/contents/{+path}","compare_url":"https://api.github.com/repos/andela/suyabay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/suyabay/merges","archive_url":"https://api.github.com/repos/andela/suyabay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/suyabay/downloads","issues_url":"https://api.github.com/repos/andela/suyabay/issues{/number}","pulls_url":"https://api.github.com/repos/andela/suyabay/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/suyabay/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/suyabay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/suyabay/labels{/name}","releases_url":"https://api.github.com/repos/andela/suyabay/releases{/id}","deployments_url":"https://api.github.com/repos/andela/suyabay/deployments","created_at":"2015-09-03T11:00:56Z","updated_at":"2016-03-11T18:32:31Z","pushed_at":"2016-06-01T14:05:14Z","git_url":"git://github.com/andela/suyabay.git","ssh_url":"git@github.com:andela/suyabay.git","clone_url":"https://github.com/andela/suyabay.git","svn_url":"https://github.com/andela/suyabay","homepage":"https://suyabay-staging.herokuapp.com","size":35780,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":8,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/suyabay/pulls/298"},"html":{"href":"https://github.com/andela/suyabay/pull/298"},"issue":{"href":"https://api.github.com/repos/andela/suyabay/issues/298"},"comments":{"href":"https://api.github.com/repos/andela/suyabay/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/suyabay/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/suyabay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/suyabay/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/andela/suyabay/statuses/a2da62f153b55572035abb19446eda7e9bf1da49"}}}}
{"actor":{"display_login":"Nitpick-CI"}}