{"action":"created","comment":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/233152576","pull_request_review_id":174500023,"id":233152576,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzE1MjU3Ng==","diff_hunk":"@@ -0,0 +1,63 @@\n+package tech.cryptonomic.conseil.tezos\n+\n+import com.typesafe.config.Config\n+\n+import scala.concurrent.{ExecutionContext, Future}\n+import scala.collection.JavaConverters._\n+\n+\n+object ServiceOperations {\n+\n+  final case class Counts(blocks: Int, accounts: Int, operationGroups: Int, operations: Int, fees: Int)\n+\n+  final case class Network(name: String, displayName: String, platform: String, network: String)\n+\n+  final case class Entity(name: String, displayName: String, count: Int, network: String)\n+\n+  def getNetworks(config: Config): List[Network] = {\n+    config.getObject(\"platforms\").asScala.flatMap {\n+      case (platform, strippedConf) =>\n+        strippedConf.atKey(platform).getObject(platform).asScala.map {\n+          case (network, _) =>\n+            Network(network, network.capitalize, platform, network)\n+        }.toList\n+    }.toList\n+  }\n+\n+  def getEntities(network: String)(implicit ec: ExecutionContext): Future[List[Entity]] = {","path":"src/main/scala/tech/cryptonomic/conseil/tezos/ServiceOperations.scala","position":null,"original_position":27,"commit_id":"13b614d8ff6f7ab48d0a370b04955933a78c72ec","original_commit_id":"69c956ec417d6709432cf98adcd8fc71595a508b","user":{"login":"piotrkosecki","id":2283610,"node_id":"MDQ6VXNlcjIyODM2MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/2283610?v=4","gravatar_id":"","url":"https://api.github.com/users/piotrkosecki","html_url":"https://github.com/piotrkosecki","followers_url":"https://api.github.com/users/piotrkosecki/followers","following_url":"https://api.github.com/users/piotrkosecki/following{/other_user}","gists_url":"https://api.github.com/users/piotrkosecki/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrkosecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrkosecki/subscriptions","organizations_url":"https://api.github.com/users/piotrkosecki/orgs","repos_url":"https://api.github.com/users/piotrkosecki/repos","events_url":"https://api.github.com/users/piotrkosecki/events{/privacy}","received_events_url":"https://api.github.com/users/piotrkosecki/received_events","type":"User","site_admin":false},"body":"I tried to do it more agnostic, but not its not as good as I would like. Slick is didn't give me a lot to work with. changed it in the new PR.","created_at":"2018-11-13T17:44:57Z","updated_at":"2018-11-13T17:44:57Z","html_url":"https://github.com/Cryptonomic/Conseil/pull/185#discussion_r233152576","pull_request_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/233152576"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/185#discussion_r233152576"},"pull_request":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185"}},"in_reply_to_id":232019514},"pull_request":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185","id":229416473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NDE2NDcz","html_url":"https://github.com/Cryptonomic/Conseil/pull/185","diff_url":"https://github.com/Cryptonomic/Conseil/pull/185.diff","patch_url":"https://github.com/Cryptonomic/Conseil/pull/185.patch","issue_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/185","number":185,"state":"open","locked":false,"title":"Conseil 180/181 expose list of available networks and entities in service route","user":{"login":"piotrkosecki","id":2283610,"node_id":"MDQ6VXNlcjIyODM2MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/2283610?v=4","gravatar_id":"","url":"https://api.github.com/users/piotrkosecki","html_url":"https://github.com/piotrkosecki","followers_url":"https://api.github.com/users/piotrkosecki/followers","following_url":"https://api.github.com/users/piotrkosecki/following{/other_user}","gists_url":"https://api.github.com/users/piotrkosecki/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrkosecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrkosecki/subscriptions","organizations_url":"https://api.github.com/users/piotrkosecki/orgs","repos_url":"https://api.github.com/users/piotrkosecki/repos","events_url":"https://api.github.com/users/piotrkosecki/events{/privacy}","received_events_url":"https://api.github.com/users/piotrkosecki/received_events","type":"User","site_admin":false},"body":"In this PR I'm adding 2 service endpoints:\r\n1. `{host}:{port}/service/networks`\r\n2. `{host}:{port}/service/networks/{network-name}/entities`\r\n\r\nFirst one returns networks from config defined at `platforms` path(#180 ).\r\nSecond one returns entities and and counts their occurrences in the db (#181 ).","created_at":"2018-11-08T16:00:03Z","updated_at":"2018-11-13T17:44:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9baed74e2e27701262d68412eb12d5e463cf0083","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185/commits","review_comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185/comments","review_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/185/comments","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/13b614d8ff6f7ab48d0a370b04955933a78c72ec","head":{"label":"Cryptonomic:CONSEIL-180-Expose_list_of_available_networks","ref":"CONSEIL-180-Expose_list_of_available_networks","sha":"13b614d8ff6f7ab48d0a370b04955933a78c72ec","user":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"repo":{"id":112683908,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2ODM5MDg=","name":"Conseil","full_name":"Cryptonomic/Conseil","private":false,"owner":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Cryptonomic/Conseil","description":"Query API for decentralized platforms.","fork":false,"url":"https://api.github.com/repos/Cryptonomic/Conseil","forks_url":"https://api.github.com/repos/Cryptonomic/Conseil/forks","keys_url":"https://api.github.com/repos/Cryptonomic/Conseil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cryptonomic/Conseil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cryptonomic/Conseil/teams","hooks_url":"https://api.github.com/repos/Cryptonomic/Conseil/hooks","issue_events_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/events{/number}","events_url":"https://api.github.com/repos/Cryptonomic/Conseil/events","assignees_url":"https://api.github.com/repos/Cryptonomic/Conseil/assignees{/user}","branches_url":"https://api.github.com/repos/Cryptonomic/Conseil/branches{/branch}","tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/tags","blobs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/{sha}","languages_url":"https://api.github.com/repos/Cryptonomic/Conseil/languages","stargazers_url":"https://api.github.com/repos/Cryptonomic/Conseil/stargazers","contributors_url":"https://api.github.com/repos/Cryptonomic/Conseil/contributors","subscribers_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscribers","subscription_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscription","commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cryptonomic/Conseil/contents/{+path}","compare_url":"https://api.github.com/repos/Cryptonomic/Conseil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cryptonomic/Conseil/merges","archive_url":"https://api.github.com/repos/Cryptonomic/Conseil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cryptonomic/Conseil/downloads","issues_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues{/number}","pulls_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls{/number}","milestones_url":"https://api.github.com/repos/Cryptonomic/Conseil/milestones{/number}","notifications_url":"https://api.github.com/repos/Cryptonomic/Conseil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cryptonomic/Conseil/labels{/name}","releases_url":"https://api.github.com/repos/Cryptonomic/Conseil/releases{/id}","deployments_url":"https://api.github.com/repos/Cryptonomic/Conseil/deployments","created_at":"2017-12-01T02:12:56Z","updated_at":"2018-11-08T23:22:37Z","pushed_at":"2018-11-13T15:16:24Z","git_url":"git://github.com/Cryptonomic/Conseil.git","ssh_url":"git@github.com:Cryptonomic/Conseil.git","clone_url":"https://github.com/Cryptonomic/Conseil.git","svn_url":"https://github.com/Cryptonomic/Conseil","homepage":"","size":2237,"stargazers_count":16,"watchers_count":16,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":42,"watchers":16,"default_branch":"master"}},"base":{"label":"Cryptonomic:master","ref":"master","sha":"b89624570bba70fcaa34efa87918b626e65ef599","user":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"repo":{"id":112683908,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2ODM5MDg=","name":"Conseil","full_name":"Cryptonomic/Conseil","private":false,"owner":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Cryptonomic/Conseil","description":"Query API for decentralized platforms.","fork":false,"url":"https://api.github.com/repos/Cryptonomic/Conseil","forks_url":"https://api.github.com/repos/Cryptonomic/Conseil/forks","keys_url":"https://api.github.com/repos/Cryptonomic/Conseil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cryptonomic/Conseil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cryptonomic/Conseil/teams","hooks_url":"https://api.github.com/repos/Cryptonomic/Conseil/hooks","issue_events_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/events{/number}","events_url":"https://api.github.com/repos/Cryptonomic/Conseil/events","assignees_url":"https://api.github.com/repos/Cryptonomic/Conseil/assignees{/user}","branches_url":"https://api.github.com/repos/Cryptonomic/Conseil/branches{/branch}","tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/tags","blobs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/{sha}","languages_url":"https://api.github.com/repos/Cryptonomic/Conseil/languages","stargazers_url":"https://api.github.com/repos/Cryptonomic/Conseil/stargazers","contributors_url":"https://api.github.com/repos/Cryptonomic/Conseil/contributors","subscribers_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscribers","subscription_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscription","commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cryptonomic/Conseil/contents/{+path}","compare_url":"https://api.github.com/repos/Cryptonomic/Conseil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cryptonomic/Conseil/merges","archive_url":"https://api.github.com/repos/Cryptonomic/Conseil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cryptonomic/Conseil/downloads","issues_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues{/number}","pulls_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls{/number}","milestones_url":"https://api.github.com/repos/Cryptonomic/Conseil/milestones{/number}","notifications_url":"https://api.github.com/repos/Cryptonomic/Conseil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cryptonomic/Conseil/labels{/name}","releases_url":"https://api.github.com/repos/Cryptonomic/Conseil/releases{/id}","deployments_url":"https://api.github.com/repos/Cryptonomic/Conseil/deployments","created_at":"2017-12-01T02:12:56Z","updated_at":"2018-11-08T23:22:37Z","pushed_at":"2018-11-13T15:16:24Z","git_url":"git://github.com/Cryptonomic/Conseil.git","ssh_url":"git@github.com:Cryptonomic/Conseil.git","clone_url":"https://github.com/Cryptonomic/Conseil.git","svn_url":"https://github.com/Cryptonomic/Conseil","homepage":"","size":2237,"stargazers_count":16,"watchers_count":16,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":42,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/185"},"issue":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/185"},"comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/13b614d8ff6f7ab48d0a370b04955933a78c72ec"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"piotrkosecki"}}