{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/comments/72017911","id":72017911,"diff_hunk":"@@ -0,0 +1,68 @@\n+package com.framgia.edu.weatherforecast.util;\n+\n+import com.framgia.edu.weatherforecast.data.models.DataPoint;\n+import com.framgia.edu.weatherforecast.data.models.ForecastResponse;\n+import com.framgia.edu.weatherforecast.data.models.TemperatureUnit;\n+\n+import java.util.List;\n+\n+/**\n+ * Created by binh on 7/24/16.\n+ */\n+public class UnitConverter {\n+    public static ForecastResponse temperatureToCelsius(ForecastResponse forecastResponse) {\n+        DataPoint currently = forecastResponse.getCurrently();\n+        List<DataPoint> hourlyData = forecastResponse.getHourly().getData();\n+        List<DataPoint> dailyData = forecastResponse.getDaily().getData();\n+        DataPoint dataPoint;\n+        int listSize;\n+        double temperature = currently.getTemperature();\n+        double temperatureMax;\n+\n+        currently.setTemperature(TemperatureUnit.toCelsius(temperature));\n+        listSize = hourlyData.size();\n+        for (int i = 0; i < listSize; i++) {\n+            dataPoint = hourlyData.get(i);\n+            temperature = dataPoint.getTemperature();\n+            dataPoint.setTemperature(TemperatureUnit.toCelsius(temperature));\n+\n+        }\n+        listSize = dailyData.size();\n+        for (int i = 0; i < listSize; i++) {\n+            dataPoint = dailyData.get(i);\n+            temperature = dataPoint.getTemperature();\n+            temperatureMax = dataPoint.getTemperatureMax();\n+            dataPoint.setTemperature(TemperatureUnit.toCelsius(temperature));\n+            dataPoint.setTemperatureMax(TemperatureUnit.toCelsius(temperatureMax));\n+        }\n+        return forecastResponse;\n+    }\n+\n+    public static ForecastResponse temperatureToFahrenheit(ForecastResponse forecastResponse) {\n+        DataPoint currently = forecastResponse.getCurrently();","path":"app/src/main/java/com/framgia/edu/weatherforecast/util/UnitConverter.java","position":42,"original_position":42,"commit_id":"509fb97b5d6f12567543343f927fb72182d97daa","original_commit_id":"509fb97b5d6f12567543343f927fb72182d97daa","user":{"login":"nvmanh","id":2127662,"avatar_url":"https://avatars.githubusercontent.com/u/2127662?v=3","gravatar_id":"","url":"https://api.github.com/users/nvmanh","html_url":"https://github.com/nvmanh","followers_url":"https://api.github.com/users/nvmanh/followers","following_url":"https://api.github.com/users/nvmanh/following{/other_user}","gists_url":"https://api.github.com/users/nvmanh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvmanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvmanh/subscriptions","organizations_url":"https://api.github.com/users/nvmanh/orgs","repos_url":"https://api.github.com/users/nvmanh/repos","events_url":"https://api.github.com/users/nvmanh/events{/privacy}","received_events_url":"https://api.github.com/users/nvmanh/received_events","type":"User","site_admin":false},"body":"currently cũng sai chính tả, e có thể đặt là currentPoint cho rõ nghĩa chẳng hạn. hoặc currentWeatherData...","created_at":"2016-07-25T07:19:04Z","updated_at":"2016-07-25T07:19:04Z","html_url":"https://github.com/framgia/Weather_Forecast_1/pull/7#discussion_r72017911","pull_request_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/comments/72017911"},"html":{"href":"https://github.com/framgia/Weather_Forecast_1/pull/7#discussion_r72017911"},"pull_request":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7","id":78594331,"html_url":"https://github.com/framgia/Weather_Forecast_1/pull/7","diff_url":"https://github.com/framgia/Weather_Forecast_1/pull/7.diff","patch_url":"https://github.com/framgia/Weather_Forecast_1/pull/7.patch","issue_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/7","number":7,"state":"open","locked":false,"title":"Setting units","user":{"login":"binhthanhnguyen","id":12368804,"avatar_url":"https://avatars.githubusercontent.com/u/12368804?v=3","gravatar_id":"","url":"https://api.github.com/users/binhthanhnguyen","html_url":"https://github.com/binhthanhnguyen","followers_url":"https://api.github.com/users/binhthanhnguyen/followers","following_url":"https://api.github.com/users/binhthanhnguyen/following{/other_user}","gists_url":"https://api.github.com/users/binhthanhnguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/binhthanhnguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binhthanhnguyen/subscriptions","organizations_url":"https://api.github.com/users/binhthanhnguyen/orgs","repos_url":"https://api.github.com/users/binhthanhnguyen/repos","events_url":"https://api.github.com/users/binhthanhnguyen/events{/privacy}","received_events_url":"https://api.github.com/users/binhthanhnguyen/received_events","type":"User","site_admin":false},"body":"Setting temperature units","created_at":"2016-07-24T09:51:23Z","updated_at":"2016-07-25T07:19:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d97c3b22bf594d3bc40f6dd184c772a21e1e003","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7/commits","review_comments_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7/comments","review_comment_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/7/comments","statuses_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/statuses/509fb97b5d6f12567543343f927fb72182d97daa","head":{"label":"binhthanhnguyen:setting-units","ref":"setting-units","sha":"509fb97b5d6f12567543343f927fb72182d97daa","user":{"login":"binhthanhnguyen","id":12368804,"avatar_url":"https://avatars.githubusercontent.com/u/12368804?v=3","gravatar_id":"","url":"https://api.github.com/users/binhthanhnguyen","html_url":"https://github.com/binhthanhnguyen","followers_url":"https://api.github.com/users/binhthanhnguyen/followers","following_url":"https://api.github.com/users/binhthanhnguyen/following{/other_user}","gists_url":"https://api.github.com/users/binhthanhnguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/binhthanhnguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binhthanhnguyen/subscriptions","organizations_url":"https://api.github.com/users/binhthanhnguyen/orgs","repos_url":"https://api.github.com/users/binhthanhnguyen/repos","events_url":"https://api.github.com/users/binhthanhnguyen/events{/privacy}","received_events_url":"https://api.github.com/users/binhthanhnguyen/received_events","type":"User","site_admin":false},"repo":{"id":62680965,"name":"Weather_Forecast_1","full_name":"binhthanhnguyen/Weather_Forecast_1","owner":{"login":"binhthanhnguyen","id":12368804,"avatar_url":"https://avatars.githubusercontent.com/u/12368804?v=3","gravatar_id":"","url":"https://api.github.com/users/binhthanhnguyen","html_url":"https://github.com/binhthanhnguyen","followers_url":"https://api.github.com/users/binhthanhnguyen/followers","following_url":"https://api.github.com/users/binhthanhnguyen/following{/other_user}","gists_url":"https://api.github.com/users/binhthanhnguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/binhthanhnguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binhthanhnguyen/subscriptions","organizations_url":"https://api.github.com/users/binhthanhnguyen/orgs","repos_url":"https://api.github.com/users/binhthanhnguyen/repos","events_url":"https://api.github.com/users/binhthanhnguyen/events{/privacy}","received_events_url":"https://api.github.com/users/binhthanhnguyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/binhthanhnguyen/Weather_Forecast_1","description":"Framgia Weather Forecast App (training)","fork":true,"url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1","forks_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/forks","keys_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/teams","hooks_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/hooks","issue_events_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/issues/events{/number}","events_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/events","assignees_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/assignees{/user}","branches_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/branches{/branch}","tags_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/tags","blobs_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/statuses/{sha}","languages_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/languages","stargazers_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/stargazers","contributors_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/contributors","subscribers_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/subscribers","subscription_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/subscription","commits_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/contents/{+path}","compare_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/merges","archive_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/downloads","issues_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/issues{/number}","pulls_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/pulls{/number}","milestones_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/milestones{/number}","notifications_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/labels{/name}","releases_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/releases{/id}","deployments_url":"https://api.github.com/repos/binhthanhnguyen/Weather_Forecast_1/deployments","created_at":"2016-07-06T01:21:15Z","updated_at":"2016-07-05T11:47:34Z","pushed_at":"2016-07-25T06:25:39Z","git_url":"git://github.com/binhthanhnguyen/Weather_Forecast_1.git","ssh_url":"git@github.com:binhthanhnguyen/Weather_Forecast_1.git","clone_url":"https://github.com/binhthanhnguyen/Weather_Forecast_1.git","svn_url":"https://github.com/binhthanhnguyen/Weather_Forecast_1","homepage":null,"size":164,"stargazers_count":0,"watchers_count":0,"language":null,"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":"framgia:develop","ref":"develop","sha":"75a2b1fef6e4e31bdbfe0f9977df0a952ccd434c","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":62632567,"name":"Weather_Forecast_1","full_name":"framgia/Weather_Forecast_1","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/Weather_Forecast_1","description":"Framgia Weather Forecast App (training)","fork":false,"url":"https://api.github.com/repos/framgia/Weather_Forecast_1","forks_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/forks","keys_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/teams","hooks_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/hooks","issue_events_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/events","assignees_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/tags","blobs_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/languages","stargazers_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/stargazers","contributors_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/contributors","subscribers_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/subscribers","subscription_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/subscription","commits_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/merges","archive_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/downloads","issues_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/labels{/name}","releases_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/Weather_Forecast_1/deployments","created_at":"2016-07-05T11:47:34Z","updated_at":"2016-07-05T11:47:34Z","pushed_at":"2016-07-25T06:25:40Z","git_url":"git://github.com/framgia/Weather_Forecast_1.git","ssh_url":"git@github.com:framgia/Weather_Forecast_1.git","clone_url":"https://github.com/framgia/Weather_Forecast_1.git","svn_url":"https://github.com/framgia/Weather_Forecast_1","homepage":null,"size":154,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7"},"html":{"href":"https://github.com/framgia/Weather_Forecast_1/pull/7"},"issue":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/7"},"comments":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/Weather_Forecast_1/statuses/509fb97b5d6f12567543343f927fb72182d97daa"}}}}
{"actor":{"display_login":"nvmanh"}}