{"action":"created","comment":{"url":"https://api.github.com/repos/elijahkim/reactor/pulls/comments/72492188","id":72492188,"diff_hunk":"@@ -21,6 +21,22 @@ defmodule Reactor.GameManager do\n     GenServer.call(@name, {:get_games})\n   end\n \n+  def get_users(game_id) do\n+    game_id\n+    |> to_reg\n+    |> GenServer.call({:get_users})\n+  end\n+\n+  def add_user_to_game(game_id, user) do\n+    game_id\n+    |> to_reg\n+    |> GenServer.cast({:add_user, user})","path":"lib/game/game_manager.ex","position":13,"original_position":13,"commit_id":"e8474e7df3ddc2d37f1a03a361db9e925ee64d08","original_commit_id":"e8474e7df3ddc2d37f1a03a361db9e925ee64d08","user":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"body":"I do a cast to add users and then I get all the users later here:\r\n\r\nhttps://github.com/elijahkim/reactor/pull/5/files#diff-1fb6039d5e4d42490e42443a5238f2f2R24\r\n\r\nI'm not sure what best practice is\r\n","created_at":"2016-07-27T18:10:09Z","updated_at":"2016-07-27T18:10:09Z","html_url":"https://github.com/elijahkim/reactor/pull/5#discussion_r72492188","pull_request_url":"https://api.github.com/repos/elijahkim/reactor/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/elijahkim/reactor/pulls/comments/72492188"},"html":{"href":"https://github.com/elijahkim/reactor/pull/5#discussion_r72492188"},"pull_request":{"href":"https://api.github.com/repos/elijahkim/reactor/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/elijahkim/reactor/pulls/5","id":79067518,"html_url":"https://github.com/elijahkim/reactor/pull/5","diff_url":"https://github.com/elijahkim/reactor/pull/5.diff","patch_url":"https://github.com/elijahkim/reactor/pull/5.patch","issue_url":"https://api.github.com/repos/elijahkim/reactor/issues/5","number":5,"state":"open","locked":false,"title":"Join particular game","user":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"body":"* Joins a specific game\r\n* Adds user to game\r\n* Shows all users in room","created_at":"2016-07-27T17:48:07Z","updated_at":"2016-07-27T18:10:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83f92d1864d0c924395b87b649a3fbb0743ad078","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elijahkim/reactor/pulls/5/commits","review_comments_url":"https://api.github.com/repos/elijahkim/reactor/pulls/5/comments","review_comment_url":"https://api.github.com/repos/elijahkim/reactor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elijahkim/reactor/issues/5/comments","statuses_url":"https://api.github.com/repos/elijahkim/reactor/statuses/e8474e7df3ddc2d37f1a03a361db9e925ee64d08","head":{"label":"elijahkim:join-particular-game","ref":"join-particular-game","sha":"e8474e7df3ddc2d37f1a03a361db9e925ee64d08","user":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"repo":{"id":64143043,"name":"reactor","full_name":"elijahkim/reactor","owner":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elijahkim/reactor","description":"Reactionary game made with Phoenix","fork":false,"url":"https://api.github.com/repos/elijahkim/reactor","forks_url":"https://api.github.com/repos/elijahkim/reactor/forks","keys_url":"https://api.github.com/repos/elijahkim/reactor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elijahkim/reactor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elijahkim/reactor/teams","hooks_url":"https://api.github.com/repos/elijahkim/reactor/hooks","issue_events_url":"https://api.github.com/repos/elijahkim/reactor/issues/events{/number}","events_url":"https://api.github.com/repos/elijahkim/reactor/events","assignees_url":"https://api.github.com/repos/elijahkim/reactor/assignees{/user}","branches_url":"https://api.github.com/repos/elijahkim/reactor/branches{/branch}","tags_url":"https://api.github.com/repos/elijahkim/reactor/tags","blobs_url":"https://api.github.com/repos/elijahkim/reactor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elijahkim/reactor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elijahkim/reactor/git/refs{/sha}","trees_url":"https://api.github.com/repos/elijahkim/reactor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elijahkim/reactor/statuses/{sha}","languages_url":"https://api.github.com/repos/elijahkim/reactor/languages","stargazers_url":"https://api.github.com/repos/elijahkim/reactor/stargazers","contributors_url":"https://api.github.com/repos/elijahkim/reactor/contributors","subscribers_url":"https://api.github.com/repos/elijahkim/reactor/subscribers","subscription_url":"https://api.github.com/repos/elijahkim/reactor/subscription","commits_url":"https://api.github.com/repos/elijahkim/reactor/commits{/sha}","git_commits_url":"https://api.github.com/repos/elijahkim/reactor/git/commits{/sha}","comments_url":"https://api.github.com/repos/elijahkim/reactor/comments{/number}","issue_comment_url":"https://api.github.com/repos/elijahkim/reactor/issues/comments{/number}","contents_url":"https://api.github.com/repos/elijahkim/reactor/contents/{+path}","compare_url":"https://api.github.com/repos/elijahkim/reactor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elijahkim/reactor/merges","archive_url":"https://api.github.com/repos/elijahkim/reactor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elijahkim/reactor/downloads","issues_url":"https://api.github.com/repos/elijahkim/reactor/issues{/number}","pulls_url":"https://api.github.com/repos/elijahkim/reactor/pulls{/number}","milestones_url":"https://api.github.com/repos/elijahkim/reactor/milestones{/number}","notifications_url":"https://api.github.com/repos/elijahkim/reactor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elijahkim/reactor/labels{/name}","releases_url":"https://api.github.com/repos/elijahkim/reactor/releases{/id}","deployments_url":"https://api.github.com/repos/elijahkim/reactor/deployments","created_at":"2016-07-25T14:49:08Z","updated_at":"2016-07-25T14:49:20Z","pushed_at":"2016-07-27T17:48:07Z","git_url":"git://github.com/elijahkim/reactor.git","ssh_url":"git@github.com:elijahkim/reactor.git","clone_url":"https://github.com/elijahkim/reactor.git","svn_url":"https://github.com/elijahkim/reactor","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"elijahkim:master","ref":"master","sha":"d870542bf25804e8a15ca06674302f081c80611a","user":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"repo":{"id":64143043,"name":"reactor","full_name":"elijahkim/reactor","owner":{"login":"elijahkim","id":8673900,"avatar_url":"https://avatars.githubusercontent.com/u/8673900?v=3","gravatar_id":"","url":"https://api.github.com/users/elijahkim","html_url":"https://github.com/elijahkim","followers_url":"https://api.github.com/users/elijahkim/followers","following_url":"https://api.github.com/users/elijahkim/following{/other_user}","gists_url":"https://api.github.com/users/elijahkim/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahkim/subscriptions","organizations_url":"https://api.github.com/users/elijahkim/orgs","repos_url":"https://api.github.com/users/elijahkim/repos","events_url":"https://api.github.com/users/elijahkim/events{/privacy}","received_events_url":"https://api.github.com/users/elijahkim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elijahkim/reactor","description":"Reactionary game made with Phoenix","fork":false,"url":"https://api.github.com/repos/elijahkim/reactor","forks_url":"https://api.github.com/repos/elijahkim/reactor/forks","keys_url":"https://api.github.com/repos/elijahkim/reactor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elijahkim/reactor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elijahkim/reactor/teams","hooks_url":"https://api.github.com/repos/elijahkim/reactor/hooks","issue_events_url":"https://api.github.com/repos/elijahkim/reactor/issues/events{/number}","events_url":"https://api.github.com/repos/elijahkim/reactor/events","assignees_url":"https://api.github.com/repos/elijahkim/reactor/assignees{/user}","branches_url":"https://api.github.com/repos/elijahkim/reactor/branches{/branch}","tags_url":"https://api.github.com/repos/elijahkim/reactor/tags","blobs_url":"https://api.github.com/repos/elijahkim/reactor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elijahkim/reactor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elijahkim/reactor/git/refs{/sha}","trees_url":"https://api.github.com/repos/elijahkim/reactor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elijahkim/reactor/statuses/{sha}","languages_url":"https://api.github.com/repos/elijahkim/reactor/languages","stargazers_url":"https://api.github.com/repos/elijahkim/reactor/stargazers","contributors_url":"https://api.github.com/repos/elijahkim/reactor/contributors","subscribers_url":"https://api.github.com/repos/elijahkim/reactor/subscribers","subscription_url":"https://api.github.com/repos/elijahkim/reactor/subscription","commits_url":"https://api.github.com/repos/elijahkim/reactor/commits{/sha}","git_commits_url":"https://api.github.com/repos/elijahkim/reactor/git/commits{/sha}","comments_url":"https://api.github.com/repos/elijahkim/reactor/comments{/number}","issue_comment_url":"https://api.github.com/repos/elijahkim/reactor/issues/comments{/number}","contents_url":"https://api.github.com/repos/elijahkim/reactor/contents/{+path}","compare_url":"https://api.github.com/repos/elijahkim/reactor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elijahkim/reactor/merges","archive_url":"https://api.github.com/repos/elijahkim/reactor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elijahkim/reactor/downloads","issues_url":"https://api.github.com/repos/elijahkim/reactor/issues{/number}","pulls_url":"https://api.github.com/repos/elijahkim/reactor/pulls{/number}","milestones_url":"https://api.github.com/repos/elijahkim/reactor/milestones{/number}","notifications_url":"https://api.github.com/repos/elijahkim/reactor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elijahkim/reactor/labels{/name}","releases_url":"https://api.github.com/repos/elijahkim/reactor/releases{/id}","deployments_url":"https://api.github.com/repos/elijahkim/reactor/deployments","created_at":"2016-07-25T14:49:08Z","updated_at":"2016-07-25T14:49:20Z","pushed_at":"2016-07-27T17:48:07Z","git_url":"git://github.com/elijahkim/reactor.git","ssh_url":"git@github.com:elijahkim/reactor.git","clone_url":"https://github.com/elijahkim/reactor.git","svn_url":"https://github.com/elijahkim/reactor","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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/elijahkim/reactor/pulls/5"},"html":{"href":"https://github.com/elijahkim/reactor/pull/5"},"issue":{"href":"https://api.github.com/repos/elijahkim/reactor/issues/5"},"comments":{"href":"https://api.github.com/repos/elijahkim/reactor/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/elijahkim/reactor/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/elijahkim/reactor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elijahkim/reactor/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/elijahkim/reactor/statuses/e8474e7df3ddc2d37f1a03a361db9e925ee64d08"}}}}
{"actor":{"display_login":"elijahkim"}}