{"action":"created","comment":{"url":"https://api.github.com/repos/iheartradio/asobu/pulls/comments/57476036","id":57476036,"diff_hunk":"@@ -0,0 +1,34 @@\n+package asobu.distributed.gateway\n+\n+import akka.actor.{Props, ActorLogging, Actor, ActorRef}\n+import akka.cluster.ddata.Replicator._\n+import asobu.distributed.EndpointsRegistry\n+import asobu.distributed.gateway.ApiDocumentationRegistry.Retrieve\n+import play.api.libs.json.{JsObject, Json}\n+\n+class ApiDocumentationRegistry(endpointsRegistry: EndpointsRegistry) extends Actor with ActorLogging {\n+  import endpointsRegistry._\n+\n+  def receive: Receive = {\n+    case Retrieve ⇒\n+      replicator ! Get(EndpointsDocsKey, ReadLocal, Some(sender))\n+\n+    case g @ GetSuccess(EndpointsDocsKey, Some(replyTo: ActorRef)) ⇒\n+      val allDoc = g.get(EndpointsDocsKey).entries.values.toList.map(\n+        Json.parse(_).as[JsObject]\n+      ).foldLeft(Json.obj())(_ deepMerge _)\n+      replyTo ! allDoc\n+\n+    case GetFailure(EndpointsDocsKey, Some(replyTo: ActorRef)) ⇒\n+      log.error(\"Failed to retrieve distributed API documentation\")\n+\n+    case NotFound(EndpointsDocsKey, Some(replyTo: ActorRef)) ⇒\n+      replyTo ! Json.obj()\n+\n+  }\n+}\n+\n+object ApiDocumentationRegistry {\n+  case object Retrieve\n+  def props(registry: EndpointsRegistry) = Props(new ApiDocumentationRegistry(registry))","path":"distributed/src/main/scala/asobu/distributed/gateway/ApiDocumentationRegistry.scala","position":33,"original_position":33,"commit_id":"97bca08806bf2e5c185a8c7e6d9e25e3f54e6da5","original_commit_id":"97bca08806bf2e5c185a8c7e6d9e25e3f54e6da5","user":{"login":"kailuowang","id":83257,"avatar_url":"https://avatars.githubusercontent.com/u/83257?v=3","gravatar_id":"","url":"https://api.github.com/users/kailuowang","html_url":"https://github.com/kailuowang","followers_url":"https://api.github.com/users/kailuowang/followers","following_url":"https://api.github.com/users/kailuowang/following{/other_user}","gists_url":"https://api.github.com/users/kailuowang/gists{/gist_id}","starred_url":"https://api.github.com/users/kailuowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kailuowang/subscriptions","organizations_url":"https://api.github.com/users/kailuowang/orgs","repos_url":"https://api.github.com/users/kailuowang/repos","events_url":"https://api.github.com/users/kailuowang/events{/privacy}","received_events_url":"https://api.github.com/users/kailuowang/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Public method must have explicit type](https://www.codacy.com/app/iHeartRadio/asobu/file/2311194874/issues/source?bid=3037259&fileBranchId=3178877#l33)","created_at":"2016-03-25T18:44:11Z","updated_at":"2016-03-25T18:44:11Z","html_url":"https://github.com/iheartradio/asobu/pull/27#discussion_r57476036","pull_request_url":"https://api.github.com/repos/iheartradio/asobu/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/comments/57476036"},"html":{"href":"https://github.com/iheartradio/asobu/pull/27#discussion_r57476036"},"pull_request":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/iheartradio/asobu/pulls/27","id":62752767,"html_url":"https://github.com/iheartradio/asobu/pull/27","diff_url":"https://github.com/iheartradio/asobu/pull/27.diff","patch_url":"https://github.com/iheartradio/asobu/pull/27.patch","issue_url":"https://api.github.com/repos/iheartradio/asobu/issues/27","number":27,"state":"open","locked":false,"title":"WIP distributed DSL for review only. do not merge","user":{"login":"kailuowang","id":83257,"avatar_url":"https://avatars.githubusercontent.com/u/83257?v=3","gravatar_id":"","url":"https://api.github.com/users/kailuowang","html_url":"https://github.com/kailuowang","followers_url":"https://api.github.com/users/kailuowang/followers","following_url":"https://api.github.com/users/kailuowang/following{/other_user}","gists_url":"https://api.github.com/users/kailuowang/gists{/gist_id}","starred_url":"https://api.github.com/users/kailuowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kailuowang/subscriptions","organizations_url":"https://api.github.com/users/kailuowang/orgs","repos_url":"https://api.github.com/users/kailuowang/repos","events_url":"https://api.github.com/users/kailuowang/events{/privacy}","received_events_url":"https://api.github.com/users/kailuowang/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-14T14:07:21Z","updated_at":"2016-03-25T18:44:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca375fa2fa5e65e5e618f9f3db94c55ee4fda76f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iheartradio/asobu/pulls/27/commits","review_comments_url":"https://api.github.com/repos/iheartradio/asobu/pulls/27/comments","review_comment_url":"https://api.github.com/repos/iheartradio/asobu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iheartradio/asobu/issues/27/comments","statuses_url":"https://api.github.com/repos/iheartradio/asobu/statuses/97bca08806bf2e5c185a8c7e6d9e25e3f54e6da5","head":{"label":"iheartradio:add-distributed","ref":"add-distributed","sha":"97bca08806bf2e5c185a8c7e6d9e25e3f54e6da5","user":{"login":"iheartradio","id":993737,"avatar_url":"https://avatars.githubusercontent.com/u/993737?v=3","gravatar_id":"","url":"https://api.github.com/users/iheartradio","html_url":"https://github.com/iheartradio","followers_url":"https://api.github.com/users/iheartradio/followers","following_url":"https://api.github.com/users/iheartradio/following{/other_user}","gists_url":"https://api.github.com/users/iheartradio/gists{/gist_id}","starred_url":"https://api.github.com/users/iheartradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iheartradio/subscriptions","organizations_url":"https://api.github.com/users/iheartradio/orgs","repos_url":"https://api.github.com/users/iheartradio/repos","events_url":"https://api.github.com/users/iheartradio/events{/privacy}","received_events_url":"https://api.github.com/users/iheartradio/received_events","type":"Organization","site_admin":false},"repo":{"id":46295926,"name":"asobu","full_name":"iheartradio/asobu","owner":{"login":"iheartradio","id":993737,"avatar_url":"https://avatars.githubusercontent.com/u/993737?v=3","gravatar_id":"","url":"https://api.github.com/users/iheartradio","html_url":"https://github.com/iheartradio","followers_url":"https://api.github.com/users/iheartradio/followers","following_url":"https://api.github.com/users/iheartradio/following{/other_user}","gists_url":"https://api.github.com/users/iheartradio/gists{/gist_id}","starred_url":"https://api.github.com/users/iheartradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iheartradio/subscriptions","organizations_url":"https://api.github.com/users/iheartradio/orgs","repos_url":"https://api.github.com/users/iheartradio/repos","events_url":"https://api.github.com/users/iheartradio/events{/privacy}","received_events_url":"https://api.github.com/users/iheartradio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iheartradio/asobu","description":"Asobu (遊ぶ) Library for building distributed REST APIs for microservices based on akka cluster and play","fork":false,"url":"https://api.github.com/repos/iheartradio/asobu","forks_url":"https://api.github.com/repos/iheartradio/asobu/forks","keys_url":"https://api.github.com/repos/iheartradio/asobu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iheartradio/asobu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iheartradio/asobu/teams","hooks_url":"https://api.github.com/repos/iheartradio/asobu/hooks","issue_events_url":"https://api.github.com/repos/iheartradio/asobu/issues/events{/number}","events_url":"https://api.github.com/repos/iheartradio/asobu/events","assignees_url":"https://api.github.com/repos/iheartradio/asobu/assignees{/user}","branches_url":"https://api.github.com/repos/iheartradio/asobu/branches{/branch}","tags_url":"https://api.github.com/repos/iheartradio/asobu/tags","blobs_url":"https://api.github.com/repos/iheartradio/asobu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iheartradio/asobu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iheartradio/asobu/git/refs{/sha}","trees_url":"https://api.github.com/repos/iheartradio/asobu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iheartradio/asobu/statuses/{sha}","languages_url":"https://api.github.com/repos/iheartradio/asobu/languages","stargazers_url":"https://api.github.com/repos/iheartradio/asobu/stargazers","contributors_url":"https://api.github.com/repos/iheartradio/asobu/contributors","subscribers_url":"https://api.github.com/repos/iheartradio/asobu/subscribers","subscription_url":"https://api.github.com/repos/iheartradio/asobu/subscription","commits_url":"https://api.github.com/repos/iheartradio/asobu/commits{/sha}","git_commits_url":"https://api.github.com/repos/iheartradio/asobu/git/commits{/sha}","comments_url":"https://api.github.com/repos/iheartradio/asobu/comments{/number}","issue_comment_url":"https://api.github.com/repos/iheartradio/asobu/issues/comments{/number}","contents_url":"https://api.github.com/repos/iheartradio/asobu/contents/{+path}","compare_url":"https://api.github.com/repos/iheartradio/asobu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iheartradio/asobu/merges","archive_url":"https://api.github.com/repos/iheartradio/asobu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iheartradio/asobu/downloads","issues_url":"https://api.github.com/repos/iheartradio/asobu/issues{/number}","pulls_url":"https://api.github.com/repos/iheartradio/asobu/pulls{/number}","milestones_url":"https://api.github.com/repos/iheartradio/asobu/milestones{/number}","notifications_url":"https://api.github.com/repos/iheartradio/asobu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iheartradio/asobu/labels{/name}","releases_url":"https://api.github.com/repos/iheartradio/asobu/releases{/id}","deployments_url":"https://api.github.com/repos/iheartradio/asobu/deployments","created_at":"2015-11-16T19:08:32Z","updated_at":"2016-01-28T17:57:18Z","pushed_at":"2016-03-25T18:26:38Z","git_url":"git://github.com/iheartradio/asobu.git","ssh_url":"git@github.com:iheartradio/asobu.git","clone_url":"https://github.com/iheartradio/asobu.git","svn_url":"https://github.com/iheartradio/asobu","homepage":"","size":2302,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"iheartradio:master","ref":"master","sha":"34c54dc17b19c15d1937abafb35dd7bd196dedb6","user":{"login":"iheartradio","id":993737,"avatar_url":"https://avatars.githubusercontent.com/u/993737?v=3","gravatar_id":"","url":"https://api.github.com/users/iheartradio","html_url":"https://github.com/iheartradio","followers_url":"https://api.github.com/users/iheartradio/followers","following_url":"https://api.github.com/users/iheartradio/following{/other_user}","gists_url":"https://api.github.com/users/iheartradio/gists{/gist_id}","starred_url":"https://api.github.com/users/iheartradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iheartradio/subscriptions","organizations_url":"https://api.github.com/users/iheartradio/orgs","repos_url":"https://api.github.com/users/iheartradio/repos","events_url":"https://api.github.com/users/iheartradio/events{/privacy}","received_events_url":"https://api.github.com/users/iheartradio/received_events","type":"Organization","site_admin":false},"repo":{"id":46295926,"name":"asobu","full_name":"iheartradio/asobu","owner":{"login":"iheartradio","id":993737,"avatar_url":"https://avatars.githubusercontent.com/u/993737?v=3","gravatar_id":"","url":"https://api.github.com/users/iheartradio","html_url":"https://github.com/iheartradio","followers_url":"https://api.github.com/users/iheartradio/followers","following_url":"https://api.github.com/users/iheartradio/following{/other_user}","gists_url":"https://api.github.com/users/iheartradio/gists{/gist_id}","starred_url":"https://api.github.com/users/iheartradio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iheartradio/subscriptions","organizations_url":"https://api.github.com/users/iheartradio/orgs","repos_url":"https://api.github.com/users/iheartradio/repos","events_url":"https://api.github.com/users/iheartradio/events{/privacy}","received_events_url":"https://api.github.com/users/iheartradio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iheartradio/asobu","description":"Asobu (遊ぶ) Library for building distributed REST APIs for microservices based on akka cluster and play","fork":false,"url":"https://api.github.com/repos/iheartradio/asobu","forks_url":"https://api.github.com/repos/iheartradio/asobu/forks","keys_url":"https://api.github.com/repos/iheartradio/asobu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iheartradio/asobu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iheartradio/asobu/teams","hooks_url":"https://api.github.com/repos/iheartradio/asobu/hooks","issue_events_url":"https://api.github.com/repos/iheartradio/asobu/issues/events{/number}","events_url":"https://api.github.com/repos/iheartradio/asobu/events","assignees_url":"https://api.github.com/repos/iheartradio/asobu/assignees{/user}","branches_url":"https://api.github.com/repos/iheartradio/asobu/branches{/branch}","tags_url":"https://api.github.com/repos/iheartradio/asobu/tags","blobs_url":"https://api.github.com/repos/iheartradio/asobu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iheartradio/asobu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iheartradio/asobu/git/refs{/sha}","trees_url":"https://api.github.com/repos/iheartradio/asobu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iheartradio/asobu/statuses/{sha}","languages_url":"https://api.github.com/repos/iheartradio/asobu/languages","stargazers_url":"https://api.github.com/repos/iheartradio/asobu/stargazers","contributors_url":"https://api.github.com/repos/iheartradio/asobu/contributors","subscribers_url":"https://api.github.com/repos/iheartradio/asobu/subscribers","subscription_url":"https://api.github.com/repos/iheartradio/asobu/subscription","commits_url":"https://api.github.com/repos/iheartradio/asobu/commits{/sha}","git_commits_url":"https://api.github.com/repos/iheartradio/asobu/git/commits{/sha}","comments_url":"https://api.github.com/repos/iheartradio/asobu/comments{/number}","issue_comment_url":"https://api.github.com/repos/iheartradio/asobu/issues/comments{/number}","contents_url":"https://api.github.com/repos/iheartradio/asobu/contents/{+path}","compare_url":"https://api.github.com/repos/iheartradio/asobu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iheartradio/asobu/merges","archive_url":"https://api.github.com/repos/iheartradio/asobu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iheartradio/asobu/downloads","issues_url":"https://api.github.com/repos/iheartradio/asobu/issues{/number}","pulls_url":"https://api.github.com/repos/iheartradio/asobu/pulls{/number}","milestones_url":"https://api.github.com/repos/iheartradio/asobu/milestones{/number}","notifications_url":"https://api.github.com/repos/iheartradio/asobu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iheartradio/asobu/labels{/name}","releases_url":"https://api.github.com/repos/iheartradio/asobu/releases{/id}","deployments_url":"https://api.github.com/repos/iheartradio/asobu/deployments","created_at":"2015-11-16T19:08:32Z","updated_at":"2016-01-28T17:57:18Z","pushed_at":"2016-03-25T18:26:38Z","git_url":"git://github.com/iheartradio/asobu.git","ssh_url":"git@github.com:iheartradio/asobu.git","clone_url":"https://github.com/iheartradio/asobu.git","svn_url":"https://github.com/iheartradio/asobu","homepage":"","size":2302,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/27"},"html":{"href":"https://github.com/iheartradio/asobu/pull/27"},"issue":{"href":"https://api.github.com/repos/iheartradio/asobu/issues/27"},"comments":{"href":"https://api.github.com/repos/iheartradio/asobu/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iheartradio/asobu/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/iheartradio/asobu/statuses/97bca08806bf2e5c185a8c7e6d9e25e3f54e6da5"}}}}