{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/comments/224139800","pull_request_review_id":163434609,"id":224139800,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDEzOTgwMA==","diff_hunk":"@@ -0,0 +1,25 @@\n+# frozen_string_literal: true\n+\n+class OpenLibraryService\n+  include HTTParty\n+  base_uri 'https://openlibrary.org'\n+  def book_info(isbn)\n+    hash_response = build_hash(isbn)\n+    hash_response\n+  end\n+\n+  private\n+\n+  def build_hash(isbn)\n+    url_isbn = \"ISBN:#{isbn}\"\n+    @options = { query: { bibkeys: url_isbn, format: 'json', jscmd: 'data' } }\n+    ol_response = self.class.get('/api/books', @options)[url_isbn]\n+    hash_response = {}\n+    hash_response['isbn'] = isbn","path":"app/services/open_library_service.rb","position":18,"original_position":18,"commit_id":"862c4acc0eedebebf7a0ae88cc379869ae764a29","original_commit_id":"862c4acc0eedebebf7a0ae88cc379869ae764a29","user":{"login":"nicozar95","id":11698687,"node_id":"MDQ6VXNlcjExNjk4Njg3","avatar_url":"https://avatars1.githubusercontent.com/u/11698687?v=4","gravatar_id":"","url":"https://api.github.com/users/nicozar95","html_url":"https://github.com/nicozar95","followers_url":"https://api.github.com/users/nicozar95/followers","following_url":"https://api.github.com/users/nicozar95/following{/other_user}","gists_url":"https://api.github.com/users/nicozar95/gists{/gist_id}","starred_url":"https://api.github.com/users/nicozar95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicozar95/subscriptions","organizations_url":"https://api.github.com/users/nicozar95/orgs","repos_url":"https://api.github.com/users/nicozar95/repos","events_url":"https://api.github.com/users/nicozar95/events{/privacy}","received_events_url":"https://api.github.com/users/nicozar95/received_events","type":"User","site_admin":false},"body":"```\r\ndef hash_response\r\n{\r\n  isbn: ..,\r\n  title: ..,\r\n  . . .\r\nend\r\n```\r\n\r\nMove the hash_response into a new method","created_at":"2018-10-10T15:57:44Z","updated_at":"2018-10-10T15:58:41Z","html_url":"https://github.com/wolox-training/adl-rails/pull/20#discussion_r224139800","pull_request_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/comments/224139800"},"html":{"href":"https://github.com/wolox-training/adl-rails/pull/20#discussion_r224139800"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20","id":221525162,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTI1MTYy","html_url":"https://github.com/wolox-training/adl-rails/pull/20","diff_url":"https://github.com/wolox-training/adl-rails/pull/20.diff","patch_url":"https://github.com/wolox-training/adl-rails/pull/20.patch","issue_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/20","number":20,"state":"open","locked":false,"title":"External api integration","user":{"login":"alanlamaswolox","id":42941051,"node_id":"MDQ6VXNlcjQyOTQxMDUx","avatar_url":"https://avatars1.githubusercontent.com/u/42941051?v=4","gravatar_id":"","url":"https://api.github.com/users/alanlamaswolox","html_url":"https://github.com/alanlamaswolox","followers_url":"https://api.github.com/users/alanlamaswolox/followers","following_url":"https://api.github.com/users/alanlamaswolox/following{/other_user}","gists_url":"https://api.github.com/users/alanlamaswolox/gists{/gist_id}","starred_url":"https://api.github.com/users/alanlamaswolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanlamaswolox/subscriptions","organizations_url":"https://api.github.com/users/alanlamaswolox/orgs","repos_url":"https://api.github.com/users/alanlamaswolox/repos","events_url":"https://api.github.com/users/alanlamaswolox/events{/privacy}","received_events_url":"https://api.github.com/users/alanlamaswolox/received_events","type":"User","site_admin":false},"body":"## Summary\r\nCreated OpenLibraryService service for connect Open Library API and return specific books\r\n\r\n## Trello\r\nhttps://trello.com/c/yUjfhjGn/38-28-integraci%C3%B3n-api-externa ","created_at":"2018-10-09T17:36:36Z","updated_at":"2018-10-10T15:58:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08165a2a231a3bddf7414b4936a86cf7bb25d0ee","assignee":{"login":"fedeest","id":17027853,"node_id":"MDQ6VXNlcjE3MDI3ODUz","avatar_url":"https://avatars3.githubusercontent.com/u/17027853?v=4","gravatar_id":"","url":"https://api.github.com/users/fedeest","html_url":"https://github.com/fedeest","followers_url":"https://api.github.com/users/fedeest/followers","following_url":"https://api.github.com/users/fedeest/following{/other_user}","gists_url":"https://api.github.com/users/fedeest/gists{/gist_id}","starred_url":"https://api.github.com/users/fedeest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedeest/subscriptions","organizations_url":"https://api.github.com/users/fedeest/orgs","repos_url":"https://api.github.com/users/fedeest/repos","events_url":"https://api.github.com/users/fedeest/events{/privacy}","received_events_url":"https://api.github.com/users/fedeest/received_events","type":"User","site_admin":false},"assignees":[{"login":"fedeest","id":17027853,"node_id":"MDQ6VXNlcjE3MDI3ODUz","avatar_url":"https://avatars3.githubusercontent.com/u/17027853?v=4","gravatar_id":"","url":"https://api.github.com/users/fedeest","html_url":"https://github.com/fedeest","followers_url":"https://api.github.com/users/fedeest/followers","following_url":"https://api.github.com/users/fedeest/following{/other_user}","gists_url":"https://api.github.com/users/fedeest/gists{/gist_id}","starred_url":"https://api.github.com/users/fedeest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedeest/subscriptions","organizations_url":"https://api.github.com/users/fedeest/orgs","repos_url":"https://api.github.com/users/fedeest/repos","events_url":"https://api.github.com/users/fedeest/events{/privacy}","received_events_url":"https://api.github.com/users/fedeest/received_events","type":"User","site_admin":false},{"login":"alanlamaswolox","id":42941051,"node_id":"MDQ6VXNlcjQyOTQxMDUx","avatar_url":"https://avatars1.githubusercontent.com/u/42941051?v=4","gravatar_id":"","url":"https://api.github.com/users/alanlamaswolox","html_url":"https://github.com/alanlamaswolox","followers_url":"https://api.github.com/users/alanlamaswolox/followers","following_url":"https://api.github.com/users/alanlamaswolox/following{/other_user}","gists_url":"https://api.github.com/users/alanlamaswolox/gists{/gist_id}","starred_url":"https://api.github.com/users/alanlamaswolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanlamaswolox/subscriptions","organizations_url":"https://api.github.com/users/alanlamaswolox/orgs","repos_url":"https://api.github.com/users/alanlamaswolox/repos","events_url":"https://api.github.com/users/alanlamaswolox/events{/privacy}","received_events_url":"https://api.github.com/users/alanlamaswolox/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"fedeest","id":17027853,"node_id":"MDQ6VXNlcjE3MDI3ODUz","avatar_url":"https://avatars3.githubusercontent.com/u/17027853?v=4","gravatar_id":"","url":"https://api.github.com/users/fedeest","html_url":"https://github.com/fedeest","followers_url":"https://api.github.com/users/fedeest/followers","following_url":"https://api.github.com/users/fedeest/following{/other_user}","gists_url":"https://api.github.com/users/fedeest/gists{/gist_id}","starred_url":"https://api.github.com/users/fedeest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedeest/subscriptions","organizations_url":"https://api.github.com/users/fedeest/orgs","repos_url":"https://api.github.com/users/fedeest/repos","events_url":"https://api.github.com/users/fedeest/events{/privacy}","received_events_url":"https://api.github.com/users/fedeest/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20/commits","review_comments_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20/comments","review_comment_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/20/comments","statuses_url":"https://api.github.com/repos/wolox-training/adl-rails/statuses/862c4acc0eedebebf7a0ae88cc379869ae764a29","head":{"label":"wolox-training:external_API_integration","ref":"external_API_integration","sha":"862c4acc0eedebebf7a0ae88cc379869ae764a29","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":147213434,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcyMTM0MzQ=","name":"adl-rails","full_name":"wolox-training/adl-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/adl-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/adl-rails","forks_url":"https://api.github.com/repos/wolox-training/adl-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/adl-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/adl-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/adl-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/adl-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/adl-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/adl-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/adl-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/adl-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/adl-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/adl-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/adl-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/adl-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/adl-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/adl-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/adl-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/adl-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/adl-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/adl-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/adl-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/adl-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/adl-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/adl-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/adl-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/adl-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/adl-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/adl-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/adl-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/adl-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/adl-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/adl-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/adl-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/adl-rails/deployments","created_at":"2018-09-03T14:06:41Z","updated_at":"2018-10-10T15:12:31Z","pushed_at":"2018-10-10T15:12:30Z","git_url":"git://github.com/wolox-training/adl-rails.git","ssh_url":"git@github.com:wolox-training/adl-rails.git","clone_url":"https://github.com/wolox-training/adl-rails.git","svn_url":"https://github.com/wolox-training/adl-rails","homepage":"","size":127,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"wolox-training:master","ref":"master","sha":"6c2ae7d0b3aa72a2aaaeba3daacb8d1978662db7","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":147213434,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcyMTM0MzQ=","name":"adl-rails","full_name":"wolox-training/adl-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/adl-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/adl-rails","forks_url":"https://api.github.com/repos/wolox-training/adl-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/adl-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/adl-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/adl-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/adl-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/adl-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/adl-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/adl-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/adl-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/adl-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/adl-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/adl-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/adl-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/adl-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/adl-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/adl-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/adl-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/adl-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/adl-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/adl-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/adl-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/adl-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/adl-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/adl-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/adl-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/adl-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/adl-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/adl-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/adl-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/adl-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/adl-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/adl-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/adl-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/adl-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/adl-rails/deployments","created_at":"2018-09-03T14:06:41Z","updated_at":"2018-10-10T15:12:31Z","pushed_at":"2018-10-10T15:12:30Z","git_url":"git://github.com/wolox-training/adl-rails.git","ssh_url":"git@github.com:wolox-training/adl-rails.git","clone_url":"https://github.com/wolox-training/adl-rails.git","svn_url":"https://github.com/wolox-training/adl-rails","homepage":"","size":127,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20"},"html":{"href":"https://github.com/wolox-training/adl-rails/pull/20"},"issue":{"href":"https://api.github.com/repos/wolox-training/adl-rails/issues/20"},"comments":{"href":"https://api.github.com/repos/wolox-training/adl-rails/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/adl-rails/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/adl-rails/statuses/862c4acc0eedebebf7a0ae88cc379869ae764a29"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nicozar95"}}