{"action":"created","comment":{"url":"https://api.github.com/repos/degivan/FH/pulls/comments/55935533","id":55935533,"diff_hunk":"@@ -0,0 +1,143 @@\n+package spbau.mit.divan.foodhunter.net;\n+\n+import com.annimon.stream.Collectors;\n+import com.annimon.stream.Stream;\n+import com.annimon.stream.function.Consumer;\n+import com.firebase.client.DataSnapshot;\n+import com.firebase.client.Firebase;\n+import com.firebase.client.FirebaseError;\n+import com.firebase.client.ValueEventListener;\n+import com.google.android.gms.maps.model.LatLng;\n+\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+\n+import spbau.mit.divan.foodhunter.dishes.Dish;\n+import spbau.mit.divan.foodhunter.dishes.MapObject;\n+import spbau.mit.divan.foodhunter.dishes.Place;\n+\n+public class Client {\n+    private static final Firebase APP_DATABASE = new Firebase(\"https://food-hunter.firebaseio.com/\");\n+\n+    public static void request(ValueEventListener listener) {\n+        APP_DATABASE.addListenerForSingleValueEvent(listener);\n+    }\n+\n+    public static ValueEventListener getListener(Consumer<DataSnapshot> consumer) {\n+        return new ValueEventListener() {\n+            @Override\n+            public void onDataChange(DataSnapshot dataSnapshot) {\n+                consumer.accept(dataSnapshot);\n+            }\n+\n+            @Override\n+            public void onCancelled(FirebaseError firebaseError) {\n+","path":"app/src/main/java/spbau/mit/divan/foodhunter/net/Client.java","position":39,"original_position":39,"commit_id":"b22990413711d2fc3a82642ebdc3d5b167656649","original_commit_id":"b22990413711d2fc3a82642ebdc3d5b167656649","user":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"body":"Я, честно говоря, никогда логирование не делал.  Добавил простую запись в лог при вызове `onCancelled`","created_at":"2016-03-13T11:11:56Z","updated_at":"2016-03-13T11:11:56Z","html_url":"https://github.com/degivan/FH/pull/2#discussion_r55935533","pull_request_url":"https://api.github.com/repos/degivan/FH/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/degivan/FH/pulls/comments/55935533"},"html":{"href":"https://github.com/degivan/FH/pull/2#discussion_r55935533"},"pull_request":{"href":"https://api.github.com/repos/degivan/FH/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/degivan/FH/pulls/2","id":62320909,"html_url":"https://github.com/degivan/FH/pull/2","diff_url":"https://github.com/degivan/FH/pull/2.diff","patch_url":"https://github.com/degivan/FH/pull/2.patch","issue_url":"https://api.github.com/repos/degivan/FH/issues/2","number":2,"state":"open","locked":false,"title":"fixed #1","user":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"body":"fixed after first code review","created_at":"2016-03-10T00:32:08Z","updated_at":"2016-03-13T11:11:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2e6c856e1b0cda11f7236e30775a7b92a9a65d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/degivan/FH/pulls/2/commits","review_comments_url":"https://api.github.com/repos/degivan/FH/pulls/2/comments","review_comment_url":"https://api.github.com/repos/degivan/FH/pulls/comments{/number}","comments_url":"https://api.github.com/repos/degivan/FH/issues/2/comments","statuses_url":"https://api.github.com/repos/degivan/FH/statuses/b22990413711d2fc3a82642ebdc3d5b167656649","head":{"label":"degivan:app","ref":"app","sha":"b22990413711d2fc3a82642ebdc3d5b167656649","user":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"repo":{"id":53275380,"name":"FH","full_name":"degivan/FH","owner":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/degivan/FH","description":"","fork":false,"url":"https://api.github.com/repos/degivan/FH","forks_url":"https://api.github.com/repos/degivan/FH/forks","keys_url":"https://api.github.com/repos/degivan/FH/keys{/key_id}","collaborators_url":"https://api.github.com/repos/degivan/FH/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/degivan/FH/teams","hooks_url":"https://api.github.com/repos/degivan/FH/hooks","issue_events_url":"https://api.github.com/repos/degivan/FH/issues/events{/number}","events_url":"https://api.github.com/repos/degivan/FH/events","assignees_url":"https://api.github.com/repos/degivan/FH/assignees{/user}","branches_url":"https://api.github.com/repos/degivan/FH/branches{/branch}","tags_url":"https://api.github.com/repos/degivan/FH/tags","blobs_url":"https://api.github.com/repos/degivan/FH/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/degivan/FH/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/degivan/FH/git/refs{/sha}","trees_url":"https://api.github.com/repos/degivan/FH/git/trees{/sha}","statuses_url":"https://api.github.com/repos/degivan/FH/statuses/{sha}","languages_url":"https://api.github.com/repos/degivan/FH/languages","stargazers_url":"https://api.github.com/repos/degivan/FH/stargazers","contributors_url":"https://api.github.com/repos/degivan/FH/contributors","subscribers_url":"https://api.github.com/repos/degivan/FH/subscribers","subscription_url":"https://api.github.com/repos/degivan/FH/subscription","commits_url":"https://api.github.com/repos/degivan/FH/commits{/sha}","git_commits_url":"https://api.github.com/repos/degivan/FH/git/commits{/sha}","comments_url":"https://api.github.com/repos/degivan/FH/comments{/number}","issue_comment_url":"https://api.github.com/repos/degivan/FH/issues/comments{/number}","contents_url":"https://api.github.com/repos/degivan/FH/contents/{+path}","compare_url":"https://api.github.com/repos/degivan/FH/compare/{base}...{head}","merges_url":"https://api.github.com/repos/degivan/FH/merges","archive_url":"https://api.github.com/repos/degivan/FH/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/degivan/FH/downloads","issues_url":"https://api.github.com/repos/degivan/FH/issues{/number}","pulls_url":"https://api.github.com/repos/degivan/FH/pulls{/number}","milestones_url":"https://api.github.com/repos/degivan/FH/milestones{/number}","notifications_url":"https://api.github.com/repos/degivan/FH/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/degivan/FH/labels{/name}","releases_url":"https://api.github.com/repos/degivan/FH/releases{/id}","deployments_url":"https://api.github.com/repos/degivan/FH/deployments","created_at":"2016-03-06T20:48:50Z","updated_at":"2016-03-06T20:48:50Z","pushed_at":"2016-03-13T10:24:35Z","git_url":"git://github.com/degivan/FH.git","ssh_url":"git@github.com:degivan/FH.git","clone_url":"https://github.com/degivan/FH.git","svn_url":"https://github.com/degivan/FH","homepage":null,"size":2069,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"degivan:master","ref":"master","sha":"4992fd3de89939736fc2929a663c537df1fc43dd","user":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"repo":{"id":53275380,"name":"FH","full_name":"degivan/FH","owner":{"login":"degivan","id":12800188,"avatar_url":"https://avatars.githubusercontent.com/u/12800188?v=3","gravatar_id":"","url":"https://api.github.com/users/degivan","html_url":"https://github.com/degivan","followers_url":"https://api.github.com/users/degivan/followers","following_url":"https://api.github.com/users/degivan/following{/other_user}","gists_url":"https://api.github.com/users/degivan/gists{/gist_id}","starred_url":"https://api.github.com/users/degivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degivan/subscriptions","organizations_url":"https://api.github.com/users/degivan/orgs","repos_url":"https://api.github.com/users/degivan/repos","events_url":"https://api.github.com/users/degivan/events{/privacy}","received_events_url":"https://api.github.com/users/degivan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/degivan/FH","description":"","fork":false,"url":"https://api.github.com/repos/degivan/FH","forks_url":"https://api.github.com/repos/degivan/FH/forks","keys_url":"https://api.github.com/repos/degivan/FH/keys{/key_id}","collaborators_url":"https://api.github.com/repos/degivan/FH/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/degivan/FH/teams","hooks_url":"https://api.github.com/repos/degivan/FH/hooks","issue_events_url":"https://api.github.com/repos/degivan/FH/issues/events{/number}","events_url":"https://api.github.com/repos/degivan/FH/events","assignees_url":"https://api.github.com/repos/degivan/FH/assignees{/user}","branches_url":"https://api.github.com/repos/degivan/FH/branches{/branch}","tags_url":"https://api.github.com/repos/degivan/FH/tags","blobs_url":"https://api.github.com/repos/degivan/FH/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/degivan/FH/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/degivan/FH/git/refs{/sha}","trees_url":"https://api.github.com/repos/degivan/FH/git/trees{/sha}","statuses_url":"https://api.github.com/repos/degivan/FH/statuses/{sha}","languages_url":"https://api.github.com/repos/degivan/FH/languages","stargazers_url":"https://api.github.com/repos/degivan/FH/stargazers","contributors_url":"https://api.github.com/repos/degivan/FH/contributors","subscribers_url":"https://api.github.com/repos/degivan/FH/subscribers","subscription_url":"https://api.github.com/repos/degivan/FH/subscription","commits_url":"https://api.github.com/repos/degivan/FH/commits{/sha}","git_commits_url":"https://api.github.com/repos/degivan/FH/git/commits{/sha}","comments_url":"https://api.github.com/repos/degivan/FH/comments{/number}","issue_comment_url":"https://api.github.com/repos/degivan/FH/issues/comments{/number}","contents_url":"https://api.github.com/repos/degivan/FH/contents/{+path}","compare_url":"https://api.github.com/repos/degivan/FH/compare/{base}...{head}","merges_url":"https://api.github.com/repos/degivan/FH/merges","archive_url":"https://api.github.com/repos/degivan/FH/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/degivan/FH/downloads","issues_url":"https://api.github.com/repos/degivan/FH/issues{/number}","pulls_url":"https://api.github.com/repos/degivan/FH/pulls{/number}","milestones_url":"https://api.github.com/repos/degivan/FH/milestones{/number}","notifications_url":"https://api.github.com/repos/degivan/FH/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/degivan/FH/labels{/name}","releases_url":"https://api.github.com/repos/degivan/FH/releases{/id}","deployments_url":"https://api.github.com/repos/degivan/FH/deployments","created_at":"2016-03-06T20:48:50Z","updated_at":"2016-03-06T20:48:50Z","pushed_at":"2016-03-13T10:24:35Z","git_url":"git://github.com/degivan/FH.git","ssh_url":"git@github.com:degivan/FH.git","clone_url":"https://github.com/degivan/FH.git","svn_url":"https://github.com/degivan/FH","homepage":null,"size":2069,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/degivan/FH/pulls/2"},"html":{"href":"https://github.com/degivan/FH/pull/2"},"issue":{"href":"https://api.github.com/repos/degivan/FH/issues/2"},"comments":{"href":"https://api.github.com/repos/degivan/FH/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/degivan/FH/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/degivan/FH/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/degivan/FH/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/degivan/FH/statuses/b22990413711d2fc3a82642ebdc3d5b167656649"}}}}