{"action":"created","comment":{"url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/comments/238717407","pull_request_review_id":181322939,"id":238717407,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODcxNzQwNw==","diff_hunk":"@@ -0,0 +1,56 @@\n+require 'http'\n+require 'csv'\n+\n+module WeatherFetcher\n+  module_function\n+\n+  HOST = \"http://dataservice.accuweather.com\"\n+  API_KEY = \"K2tjxrgt9AeB5lEFycbGtn5dxmHbj7rz\"\n+\n+  def get_location_key(city_name)\n+    (raise ArgumentError) unless city_name\n+\n+    city_name = sanitize_polish_characters(city_name.tr(' ', '-'))\n+\n+    response = HTTP.get(\"#{HOST}/locations/v1/cities/PL/search?apikey=#{API_KEY}&q=#{city_name}\")\n+    parsed_response = JSON.parse(response.body)\n+\n+    (raise UnknownError) unless response.code == 200\n+    (raise ArgumentError) unless parsed_response[0]","path":"3-12-2018/przemek/sinatra_weather/lib/weather_fetcher.rb","position":19,"original_position":19,"commit_id":"3654731ca85a1f25c8268298bb8d379ad343f5fb","original_commit_id":"3654731ca85a1f25c8268298bb8d379ad343f5fb","user":{"login":"GregoryWilusz","id":33359789,"node_id":"MDQ6VXNlcjMzMzU5Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/33359789?v=4","gravatar_id":"","url":"https://api.github.com/users/GregoryWilusz","html_url":"https://github.com/GregoryWilusz","followers_url":"https://api.github.com/users/GregoryWilusz/followers","following_url":"https://api.github.com/users/GregoryWilusz/following{/other_user}","gists_url":"https://api.github.com/users/GregoryWilusz/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoryWilusz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoryWilusz/subscriptions","organizations_url":"https://api.github.com/users/GregoryWilusz/orgs","repos_url":"https://api.github.com/users/GregoryWilusz/repos","events_url":"https://api.github.com/users/GregoryWilusz/events{/privacy}","received_events_url":"https://api.github.com/users/GregoryWilusz/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2018-12-04T15:44:23Z","updated_at":"2018-12-04T15:46:48Z","html_url":"https://github.com/ELBootcamp/RubyCamp2018/pull/32#discussion_r238717407","pull_request_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/comments/238717407"},"html":{"href":"https://github.com/ELBootcamp/RubyCamp2018/pull/32#discussion_r238717407"},"pull_request":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32","id":235852952,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1ODUyOTUy","html_url":"https://github.com/ELBootcamp/RubyCamp2018/pull/32","diff_url":"https://github.com/ELBootcamp/RubyCamp2018/pull/32.diff","patch_url":"https://github.com/ELBootcamp/RubyCamp2018/pull/32.patch","issue_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/32","number":32,"state":"open","locked":false,"title":"Weather przemek","user":{"login":"ppietrasik","id":18726317,"node_id":"MDQ6VXNlcjE4NzI2MzE3","avatar_url":"https://avatars2.githubusercontent.com/u/18726317?v=4","gravatar_id":"","url":"https://api.github.com/users/ppietrasik","html_url":"https://github.com/ppietrasik","followers_url":"https://api.github.com/users/ppietrasik/followers","following_url":"https://api.github.com/users/ppietrasik/following{/other_user}","gists_url":"https://api.github.com/users/ppietrasik/gists{/gist_id}","starred_url":"https://api.github.com/users/ppietrasik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppietrasik/subscriptions","organizations_url":"https://api.github.com/users/ppietrasik/orgs","repos_url":"https://api.github.com/users/ppietrasik/repos","events_url":"https://api.github.com/users/ppietrasik/events{/privacy}","received_events_url":"https://api.github.com/users/ppietrasik/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-04T15:33:09Z","updated_at":"2018-12-04T15:46:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a32d5e6d9c0c84bf20220311d6829895a2637cc4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32/commits","review_comments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32/comments","review_comment_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/32/comments","statuses_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/statuses/3654731ca85a1f25c8268298bb8d379ad343f5fb","head":{"label":"ELBootcamp:weather-przemek","ref":"weather-przemek","sha":"3654731ca85a1f25c8268298bb8d379ad343f5fb","user":{"login":"ELBootcamp","id":44985527,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTg1NTI3","avatar_url":"https://avatars3.githubusercontent.com/u/44985527?v=4","gravatar_id":"","url":"https://api.github.com/users/ELBootcamp","html_url":"https://github.com/ELBootcamp","followers_url":"https://api.github.com/users/ELBootcamp/followers","following_url":"https://api.github.com/users/ELBootcamp/following{/other_user}","gists_url":"https://api.github.com/users/ELBootcamp/gists{/gist_id}","starred_url":"https://api.github.com/users/ELBootcamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ELBootcamp/subscriptions","organizations_url":"https://api.github.com/users/ELBootcamp/orgs","repos_url":"https://api.github.com/users/ELBootcamp/repos","events_url":"https://api.github.com/users/ELBootcamp/events{/privacy}","received_events_url":"https://api.github.com/users/ELBootcamp/received_events","type":"Organization","site_admin":false},"repo":{"id":157286211,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyODYyMTE=","name":"RubyCamp2018","full_name":"ELBootcamp/RubyCamp2018","private":false,"owner":{"login":"ELBootcamp","id":44985527,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTg1NTI3","avatar_url":"https://avatars3.githubusercontent.com/u/44985527?v=4","gravatar_id":"","url":"https://api.github.com/users/ELBootcamp","html_url":"https://github.com/ELBootcamp","followers_url":"https://api.github.com/users/ELBootcamp/followers","following_url":"https://api.github.com/users/ELBootcamp/following{/other_user}","gists_url":"https://api.github.com/users/ELBootcamp/gists{/gist_id}","starred_url":"https://api.github.com/users/ELBootcamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ELBootcamp/subscriptions","organizations_url":"https://api.github.com/users/ELBootcamp/orgs","repos_url":"https://api.github.com/users/ELBootcamp/repos","events_url":"https://api.github.com/users/ELBootcamp/events{/privacy}","received_events_url":"https://api.github.com/users/ELBootcamp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ELBootcamp/RubyCamp2018","description":"RubyCamp 2018","fork":false,"url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018","forks_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/forks","keys_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/teams","hooks_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/hooks","issue_events_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/events{/number}","events_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/events","assignees_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/assignees{/user}","branches_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/branches{/branch}","tags_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/tags","blobs_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/statuses/{sha}","languages_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/languages","stargazers_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/stargazers","contributors_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/contributors","subscribers_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/subscribers","subscription_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/subscription","commits_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/contents/{+path}","compare_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/merges","archive_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/downloads","issues_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues{/number}","pulls_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls{/number}","milestones_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/milestones{/number}","notifications_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/labels{/name}","releases_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/releases{/id}","deployments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/deployments","created_at":"2018-11-12T22:29:41Z","updated_at":"2018-12-03T13:22:34Z","pushed_at":"2018-12-04T15:34:09Z","git_url":"git://github.com/ELBootcamp/RubyCamp2018.git","ssh_url":"git@github.com:ELBootcamp/RubyCamp2018.git","clone_url":"https://github.com/ELBootcamp/RubyCamp2018.git","svn_url":"https://github.com/ELBootcamp/RubyCamp2018","homepage":null,"size":295,"stargazers_count":0,"watchers_count":0,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ELBootcamp:master","ref":"master","sha":"9b5a9fa01c98350e430139f3ee88d8c29ef18538","user":{"login":"ELBootcamp","id":44985527,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTg1NTI3","avatar_url":"https://avatars3.githubusercontent.com/u/44985527?v=4","gravatar_id":"","url":"https://api.github.com/users/ELBootcamp","html_url":"https://github.com/ELBootcamp","followers_url":"https://api.github.com/users/ELBootcamp/followers","following_url":"https://api.github.com/users/ELBootcamp/following{/other_user}","gists_url":"https://api.github.com/users/ELBootcamp/gists{/gist_id}","starred_url":"https://api.github.com/users/ELBootcamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ELBootcamp/subscriptions","organizations_url":"https://api.github.com/users/ELBootcamp/orgs","repos_url":"https://api.github.com/users/ELBootcamp/repos","events_url":"https://api.github.com/users/ELBootcamp/events{/privacy}","received_events_url":"https://api.github.com/users/ELBootcamp/received_events","type":"Organization","site_admin":false},"repo":{"id":157286211,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyODYyMTE=","name":"RubyCamp2018","full_name":"ELBootcamp/RubyCamp2018","private":false,"owner":{"login":"ELBootcamp","id":44985527,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0OTg1NTI3","avatar_url":"https://avatars3.githubusercontent.com/u/44985527?v=4","gravatar_id":"","url":"https://api.github.com/users/ELBootcamp","html_url":"https://github.com/ELBootcamp","followers_url":"https://api.github.com/users/ELBootcamp/followers","following_url":"https://api.github.com/users/ELBootcamp/following{/other_user}","gists_url":"https://api.github.com/users/ELBootcamp/gists{/gist_id}","starred_url":"https://api.github.com/users/ELBootcamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ELBootcamp/subscriptions","organizations_url":"https://api.github.com/users/ELBootcamp/orgs","repos_url":"https://api.github.com/users/ELBootcamp/repos","events_url":"https://api.github.com/users/ELBootcamp/events{/privacy}","received_events_url":"https://api.github.com/users/ELBootcamp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ELBootcamp/RubyCamp2018","description":"RubyCamp 2018","fork":false,"url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018","forks_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/forks","keys_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/teams","hooks_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/hooks","issue_events_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/events{/number}","events_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/events","assignees_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/assignees{/user}","branches_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/branches{/branch}","tags_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/tags","blobs_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/statuses/{sha}","languages_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/languages","stargazers_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/stargazers","contributors_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/contributors","subscribers_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/subscribers","subscription_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/subscription","commits_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/contents/{+path}","compare_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/merges","archive_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/downloads","issues_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues{/number}","pulls_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls{/number}","milestones_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/milestones{/number}","notifications_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/labels{/name}","releases_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/releases{/id}","deployments_url":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/deployments","created_at":"2018-11-12T22:29:41Z","updated_at":"2018-12-03T13:22:34Z","pushed_at":"2018-12-04T15:34:09Z","git_url":"git://github.com/ELBootcamp/RubyCamp2018.git","ssh_url":"git@github.com:ELBootcamp/RubyCamp2018.git","clone_url":"https://github.com/ELBootcamp/RubyCamp2018.git","svn_url":"https://github.com/ELBootcamp/RubyCamp2018","homepage":null,"size":295,"stargazers_count":0,"watchers_count":0,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32"},"html":{"href":"https://github.com/ELBootcamp/RubyCamp2018/pull/32"},"issue":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/32"},"comments":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/ELBootcamp/RubyCamp2018/statuses/3654731ca85a1f25c8268298bb8d379ad343f5fb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"GregoryWilusz"}}