{"action":"created","comment":{"url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/comments/77835914","id":77835914,"diff_hunk":"@@ -0,0 +1,42 @@\n+package javapocalypse.core.api;\n+\n+import javapocalypse.common.dto.BookDTO;\n+import javapocalypse.core.api.mappers.BookMapper;\n+import javapocalypse.core.model.entities.Book;\n+import javapocalypse.core.model.repositories.BookRepository;\n+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\n+import org.springframework.web.bind.annotation.*;\n+\n+import javax.inject.Inject;\n+import java.util.List;\n+\n+@RestController\n+@EnableAutoConfiguration\n+@RequestMapping(\"/books\")\n+public class BooksController {\n+\n+    private final BookRepository bookRepository;\n+    private final BookMapper bookMapper;\n+\n+    @Inject\n+    public BooksController(BookRepository bookRepository, BookMapper bookMapper) {\n+        this.bookRepository = bookRepository;\n+        this.bookMapper = bookMapper;\n+    }\n+\n+    @RequestMapping(path = \"\", method = RequestMethod.GET, produces = \"application/json\")\n+    @ResponseBody\n+    public List<BookDTO> listBooks() {\n+        return bookMapper.mapToDTOs(bookRepository.findAll());\n+    }\n+\n+    @RequestMapping(path = \"\", method = RequestMethod.POST, consumes = \"application/json\", produces = \"application/json\")","path":"Core/src/main/java/javapocalypse/core/api/BooksController.java","position":33,"original_position":33,"commit_id":"bfc01a1965b9657ffa21c826f6b1e33da2e76a76","original_commit_id":"bfc01a1965b9657ffa21c826f6b1e33da2e76a76","user":{"login":"tdudzik","id":6402694,"avatar_url":"https://avatars.githubusercontent.com/u/6402694?v=3","gravatar_id":"","url":"https://api.github.com/users/tdudzik","html_url":"https://github.com/tdudzik","followers_url":"https://api.github.com/users/tdudzik/followers","following_url":"https://api.github.com/users/tdudzik/following{/other_user}","gists_url":"https://api.github.com/users/tdudzik/gists{/gist_id}","starred_url":"https://api.github.com/users/tdudzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdudzik/subscriptions","organizations_url":"https://api.github.com/users/tdudzik/orgs","repos_url":"https://api.github.com/users/tdudzik/repos","events_url":"https://api.github.com/users/tdudzik/events{/privacy}","received_events_url":"https://api.github.com/users/tdudzik/received_events","type":"User","site_admin":false},"body":"@egolesor  what do you mean?","created_at":"2016-09-07T14:42:48Z","updated_at":"2016-09-07T14:42:48Z","html_url":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30#discussion_r77835914","pull_request_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/comments/77835914"},"html":{"href":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30#discussion_r77835914"},"pull_request":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30","id":84289730,"html_url":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30","diff_url":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30.diff","patch_url":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30.patch","issue_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/30","number":30,"state":"open","locked":false,"title":"REST API for core","user":{"login":"tdudzik","id":6402694,"avatar_url":"https://avatars.githubusercontent.com/u/6402694?v=3","gravatar_id":"","url":"https://api.github.com/users/tdudzik","html_url":"https://github.com/tdudzik","followers_url":"https://api.github.com/users/tdudzik/followers","following_url":"https://api.github.com/users/tdudzik/following{/other_user}","gists_url":"https://api.github.com/users/tdudzik/gists{/gist_id}","starred_url":"https://api.github.com/users/tdudzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdudzik/subscriptions","organizations_url":"https://api.github.com/users/tdudzik/orgs","repos_url":"https://api.github.com/users/tdudzik/repos","events_url":"https://api.github.com/users/tdudzik/events{/privacy}","received_events_url":"https://api.github.com/users/tdudzik/received_events","type":"User","site_admin":false},"body":"REST API for core.\r\n\r\nPossibilities:\r\n * create list of books: POST http://localhost:8090\r\n * retrieve all books: GET http://localhost:8090\r\n\r\nI've wrote also a mapper (DTO -> Entity, Entity -> DTO) using the mapper from http://modelmapper.org/.","created_at":"2016-09-07T12:21:14Z","updated_at":"2016-09-07T14:42:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63628fda6525897b4ecfb468bab392a85b3cb3e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30/commits","review_comments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30/comments","review_comment_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/30/comments","statuses_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/statuses/bfc01a1965b9657ffa21c826f6b1e33da2e76a76","head":{"label":"team-javapocalypse-ja:feature/core-rest-api","ref":"feature/core-rest-api","sha":"bfc01a1965b9657ffa21c826f6b1e33da2e76a76","user":{"login":"team-javapocalypse-ja","id":21217374,"avatar_url":"https://avatars.githubusercontent.com/u/21217374?v=3","gravatar_id":"","url":"https://api.github.com/users/team-javapocalypse-ja","html_url":"https://github.com/team-javapocalypse-ja","followers_url":"https://api.github.com/users/team-javapocalypse-ja/followers","following_url":"https://api.github.com/users/team-javapocalypse-ja/following{/other_user}","gists_url":"https://api.github.com/users/team-javapocalypse-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/team-javapocalypse-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/team-javapocalypse-ja/subscriptions","organizations_url":"https://api.github.com/users/team-javapocalypse-ja/orgs","repos_url":"https://api.github.com/users/team-javapocalypse-ja/repos","events_url":"https://api.github.com/users/team-javapocalypse-ja/events{/privacy}","received_events_url":"https://api.github.com/users/team-javapocalypse-ja/received_events","type":"Organization","site_admin":false},"repo":{"id":66546628,"name":"OgreRobot","full_name":"team-javapocalypse-ja/OgreRobot","owner":{"login":"team-javapocalypse-ja","id":21217374,"avatar_url":"https://avatars.githubusercontent.com/u/21217374?v=3","gravatar_id":"","url":"https://api.github.com/users/team-javapocalypse-ja","html_url":"https://github.com/team-javapocalypse-ja","followers_url":"https://api.github.com/users/team-javapocalypse-ja/followers","following_url":"https://api.github.com/users/team-javapocalypse-ja/following{/other_user}","gists_url":"https://api.github.com/users/team-javapocalypse-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/team-javapocalypse-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/team-javapocalypse-ja/subscriptions","organizations_url":"https://api.github.com/users/team-javapocalypse-ja/orgs","repos_url":"https://api.github.com/users/team-javapocalypse-ja/repos","events_url":"https://api.github.com/users/team-javapocalypse-ja/events{/privacy}","received_events_url":"https://api.github.com/users/team-javapocalypse-ja/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/team-javapocalypse-ja/OgreRobot","description":null,"fork":false,"url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot","forks_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/forks","keys_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/teams","hooks_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/hooks","issue_events_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/events{/number}","events_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/events","assignees_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/assignees{/user}","branches_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/branches{/branch}","tags_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/tags","blobs_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/refs{/sha}","trees_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/statuses/{sha}","languages_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/languages","stargazers_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/stargazers","contributors_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/contributors","subscribers_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/subscribers","subscription_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/subscription","commits_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/commits{/sha}","git_commits_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/commits{/sha}","comments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/comments{/number}","issue_comment_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/comments{/number}","contents_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/contents/{+path}","compare_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/merges","archive_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/downloads","issues_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues{/number}","pulls_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls{/number}","milestones_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/milestones{/number}","notifications_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/labels{/name}","releases_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/releases{/id}","deployments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/deployments","created_at":"2016-08-25T09:56:30Z","updated_at":"2016-08-31T07:40:28Z","pushed_at":"2016-09-07T14:29:50Z","git_url":"git://github.com/team-javapocalypse-ja/OgreRobot.git","ssh_url":"git@github.com:team-javapocalypse-ja/OgreRobot.git","clone_url":"https://github.com/team-javapocalypse-ja/OgreRobot.git","svn_url":"https://github.com/team-javapocalypse-ja/OgreRobot","homepage":null,"size":227,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"team-javapocalypse-ja:master","ref":"master","sha":"eed3254a4547ba06ad0f1fd19405346044adc511","user":{"login":"team-javapocalypse-ja","id":21217374,"avatar_url":"https://avatars.githubusercontent.com/u/21217374?v=3","gravatar_id":"","url":"https://api.github.com/users/team-javapocalypse-ja","html_url":"https://github.com/team-javapocalypse-ja","followers_url":"https://api.github.com/users/team-javapocalypse-ja/followers","following_url":"https://api.github.com/users/team-javapocalypse-ja/following{/other_user}","gists_url":"https://api.github.com/users/team-javapocalypse-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/team-javapocalypse-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/team-javapocalypse-ja/subscriptions","organizations_url":"https://api.github.com/users/team-javapocalypse-ja/orgs","repos_url":"https://api.github.com/users/team-javapocalypse-ja/repos","events_url":"https://api.github.com/users/team-javapocalypse-ja/events{/privacy}","received_events_url":"https://api.github.com/users/team-javapocalypse-ja/received_events","type":"Organization","site_admin":false},"repo":{"id":66546628,"name":"OgreRobot","full_name":"team-javapocalypse-ja/OgreRobot","owner":{"login":"team-javapocalypse-ja","id":21217374,"avatar_url":"https://avatars.githubusercontent.com/u/21217374?v=3","gravatar_id":"","url":"https://api.github.com/users/team-javapocalypse-ja","html_url":"https://github.com/team-javapocalypse-ja","followers_url":"https://api.github.com/users/team-javapocalypse-ja/followers","following_url":"https://api.github.com/users/team-javapocalypse-ja/following{/other_user}","gists_url":"https://api.github.com/users/team-javapocalypse-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/team-javapocalypse-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/team-javapocalypse-ja/subscriptions","organizations_url":"https://api.github.com/users/team-javapocalypse-ja/orgs","repos_url":"https://api.github.com/users/team-javapocalypse-ja/repos","events_url":"https://api.github.com/users/team-javapocalypse-ja/events{/privacy}","received_events_url":"https://api.github.com/users/team-javapocalypse-ja/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/team-javapocalypse-ja/OgreRobot","description":null,"fork":false,"url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot","forks_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/forks","keys_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/teams","hooks_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/hooks","issue_events_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/events{/number}","events_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/events","assignees_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/assignees{/user}","branches_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/branches{/branch}","tags_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/tags","blobs_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/refs{/sha}","trees_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/statuses/{sha}","languages_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/languages","stargazers_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/stargazers","contributors_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/contributors","subscribers_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/subscribers","subscription_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/subscription","commits_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/commits{/sha}","git_commits_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/git/commits{/sha}","comments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/comments{/number}","issue_comment_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/comments{/number}","contents_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/contents/{+path}","compare_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/merges","archive_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/downloads","issues_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues{/number}","pulls_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls{/number}","milestones_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/milestones{/number}","notifications_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/labels{/name}","releases_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/releases{/id}","deployments_url":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/deployments","created_at":"2016-08-25T09:56:30Z","updated_at":"2016-08-31T07:40:28Z","pushed_at":"2016-09-07T14:29:50Z","git_url":"git://github.com/team-javapocalypse-ja/OgreRobot.git","ssh_url":"git@github.com:team-javapocalypse-ja/OgreRobot.git","clone_url":"https://github.com/team-javapocalypse-ja/OgreRobot.git","svn_url":"https://github.com/team-javapocalypse-ja/OgreRobot","homepage":null,"size":227,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30"},"html":{"href":"https://github.com/team-javapocalypse-ja/OgreRobot/pull/30"},"issue":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/30"},"comments":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/team-javapocalypse-ja/OgreRobot/statuses/bfc01a1965b9657ffa21c826f6b1e33da2e76a76"}}}}
{"actor":{"display_login":"tdudzik"}}