{"action":"created","comment":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/242697255","pull_request_review_id":186266673,"id":242697255,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjY5NzI1NQ==","diff_hunk":"@@ -0,0 +1,42 @@\n+package tech.cryptonomic.conseil.tezos\n+\n+import akka.http.scaladsl.model.StatusCodes\n+import akka.http.scaladsl.server.Directive1\n+import akka.http.scaladsl.server.Directives.{complete, provide}\n+import com.typesafe.config.{Config, ConfigFactory}\n+import slick.jdbc.PostgresProfile.api._\n+import tech.cryptonomic.conseil.db.DatabaseApiFiltering\n+\n+import scala.concurrent.ExecutionContext\n+import scala.util.Try\n+\n+\n+object ApiNetworkOperations {\n+  private lazy val networkOperationsMap: Map[String, Database] = getDatabaseMap\n+\n+  def apply(): ApiNetworkOperations = new ApiNetworkOperations(networkOperationsMap)\n+\n+  def getDatabaseMap: Map[String, Database] = {\n+    val config: Config = ConfigFactory.load()\n+    NetworkConfigOperations.getNetworks(config).map { network =>","path":"src/main/scala/tech/cryptonomic/conseil/tezos/ApiNetworkOperations.scala","position":21,"original_position":21,"commit_id":"1c688824e440287cc79a149f80dfb0fc412bea18","original_commit_id":"1c688824e440287cc79a149f80dfb0fc412bea18","user":{"login":"vishakh","id":931163,"node_id":"MDQ6VXNlcjkzMTE2Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/931163?v=4","gravatar_id":"","url":"https://api.github.com/users/vishakh","html_url":"https://github.com/vishakh","followers_url":"https://api.github.com/users/vishakh/followers","following_url":"https://api.github.com/users/vishakh/following{/other_user}","gists_url":"https://api.github.com/users/vishakh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishakh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishakh/subscriptions","organizations_url":"https://api.github.com/users/vishakh/orgs","repos_url":"https://api.github.com/users/vishakh/repos","events_url":"https://api.github.com/users/vishakh/events{/privacy}","received_events_url":"https://api.github.com/users/vishakh/received_events","type":"User","site_admin":false},"body":"Don't forget to check both the network and platform everywhere!","created_at":"2018-12-18T20:40:00Z","updated_at":"2018-12-18T20:51:12Z","html_url":"https://github.com/Cryptonomic/Conseil/pull/210#discussion_r242697255","pull_request_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/242697255"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/210#discussion_r242697255"},"pull_request":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210","id":239553397,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NTUzMzk3","html_url":"https://github.com/Cryptonomic/Conseil/pull/210","diff_url":"https://github.com/Cryptonomic/Conseil/pull/210.diff","patch_url":"https://github.com/Cryptonomic/Conseil/pull/210.patch","issue_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/210","number":210,"state":"open","locked":false,"title":"*WiP* Conseil 69 lorre and conseil network parametrising approach","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":"So in this PR there is my concept of parametrising Lorre and Conseil, I would want to start discussion about this approach. This is work in progress so I know that I still have some stuff to change/refactor, but I want to get your opinion first if you agree with this approach.\r\n\r\nI think that the best approach is that each network will have separate DB(it doesn't have to be different postgres instance, just DB).\r\n\r\nMain changes that I had to do were:\r\n- changing config(moving `conseildb` object deeper), so I could put different instances definitions into it\r\n- extracting database as a dependency - because the code is fairly generic, the only thing that was globally instantiated was the DB, so I had to change that. \r\n- because of the previous point I had to split some objects into class + companion object\r\n\r\nPlease take a look and comment if you agree with this approach.","created_at":"2018-12-18T16:32:51Z","updated_at":"2018-12-18T20:51:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd9de1260bfa9d7b02d3f93a80e6c41349d633ae","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ivanopagano","id":1067461,"node_id":"MDQ6VXNlcjEwNjc0NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1067461?v=4","gravatar_id":"","url":"https://api.github.com/users/ivanopagano","html_url":"https://github.com/ivanopagano","followers_url":"https://api.github.com/users/ivanopagano/followers","following_url":"https://api.github.com/users/ivanopagano/following{/other_user}","gists_url":"https://api.github.com/users/ivanopagano/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanopagano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanopagano/subscriptions","organizations_url":"https://api.github.com/users/ivanopagano/orgs","repos_url":"https://api.github.com/users/ivanopagano/repos","events_url":"https://api.github.com/users/ivanopagano/events{/privacy}","received_events_url":"https://api.github.com/users/ivanopagano/received_events","type":"User","site_admin":false},{"login":"ba205","id":7725054,"node_id":"MDQ6VXNlcjc3MjUwNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7725054?v=4","gravatar_id":"","url":"https://api.github.com/users/ba205","html_url":"https://github.com/ba205","followers_url":"https://api.github.com/users/ba205/followers","following_url":"https://api.github.com/users/ba205/following{/other_user}","gists_url":"https://api.github.com/users/ba205/gists{/gist_id}","starred_url":"https://api.github.com/users/ba205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ba205/subscriptions","organizations_url":"https://api.github.com/users/ba205/orgs","repos_url":"https://api.github.com/users/ba205/repos","events_url":"https://api.github.com/users/ba205/events{/privacy}","received_events_url":"https://api.github.com/users/ba205/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210/commits","review_comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210/comments","review_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/210/comments","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/1c688824e440287cc79a149f80dfb0fc412bea18","head":{"label":"Cryptonomic:CONSEIL-69-Lorre-and-Conseil-network-parametrizing-approach","ref":"CONSEIL-69-Lorre-and-Conseil-network-parametrizing-approach","sha":"1c688824e440287cc79a149f80dfb0fc412bea18","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-12-16T11:24:28Z","pushed_at":"2018-12-18T20:47:54Z","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":3933,"stargazers_count":22,"watchers_count":22,"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":50,"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":50,"watchers":22,"default_branch":"master"}},"base":{"label":"Cryptonomic:master","ref":"master","sha":"8a6d432f1093de16a5052d925c5fe358ed1552b6","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-12-16T11:24:28Z","pushed_at":"2018-12-18T20:47:54Z","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":3933,"stargazers_count":22,"watchers_count":22,"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":50,"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":50,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/210"},"issue":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/210"},"comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/1c688824e440287cc79a149f80dfb0fc412bea18"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"vishakh"}}