{"action":"created","issue":{"url":"https://api.github.com/repos/google/boardgame.io/issues/189","repository_url":"https://api.github.com/repos/google/boardgame.io","labels_url":"https://api.github.com/repos/google/boardgame.io/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/google/boardgame.io/issues/189/comments","events_url":"https://api.github.com/repos/google/boardgame.io/issues/189/events","html_url":"https://github.com/google/boardgame.io/pull/189","id":317825365,"number":189,"title":"lobby API support","user":{"login":"scally","id":48156,"avatar_url":"https://avatars0.githubusercontent.com/u/48156?v=4","gravatar_id":"","url":"https://api.github.com/users/scally","html_url":"https://github.com/scally","followers_url":"https://api.github.com/users/scally/followers","following_url":"https://api.github.com/users/scally/following{/other_user}","gists_url":"https://api.github.com/users/scally/gists{/gist_id}","starred_url":"https://api.github.com/users/scally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scally/subscriptions","organizations_url":"https://api.github.com/users/scally/orgs","repos_url":"https://api.github.com/users/scally/repos","events_url":"https://api.github.com/users/scally/events{/privacy}","received_events_url":"https://api.github.com/users/scally/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2018-04-25T23:15:57Z","updated_at":"2018-05-27T13:03:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/google/boardgame.io/pulls/189","html_url":"https://github.com/google/boardgame.io/pull/189","diff_url":"https://github.com/google/boardgame.io/pull/189.diff","patch_url":"https://github.com/google/boardgame.io/pull/189.patch"},"body":"This is the initial implementation of lobby API support #171 \r\n\r\nIt has two new APIs available by default on `WebSocket port + 1`.\r\n\r\n**`/games/:id/create`**: creates a new authenticated game for a game named `id`.\r\n\r\nAccepts one parameter: `numPlayers`, which is required & indicates how many credentials to create.\r\n\r\nReturns `gameID`, which is the ID of the newly created game instance.\r\n\r\n**`/game_instances/:id/join`**: allows a player to join the given game instance `id`.\r\n\r\nAccepts two parameters, both required:\r\n`playerID`: the ordinal player in the game that is being joined (0, 1...)\r\n`playerName`: the display name of the player joining the game.\r\n\r\nReturns `playerCredentials` which is the token this player will require to authenticate their actions in the future.\r\n\r\nAll actions for an authenticated game require an additional payload field: `credentials`, which must be the given secret associated to the player.\r\n\r\nA future PR will create a simple website to handle calling out to this API for projects that would prefer a zero-config solution.\r\n\r\n#### Things still needed\r\n* [x] Accepting a prop on the Client object to send a secret with all actions.\r\n* [x] New example app.\r\n* [x] Test coverage\r\n* [x] Cleanup/refactoring\r\n* [x] API documentation\r\n\r\n#### Checklist\r\n\r\n* [x] Use a separate branch in your local repo (not `master`).\r\n* [x] Test coverage is 100% (or you have a story for why it's ok)."},"comment":{"url":"https://api.github.com/repos/google/boardgame.io/issues/comments/392329589","html_url":"https://github.com/google/boardgame.io/pull/189#issuecomment-392329589","issue_url":"https://api.github.com/repos/google/boardgame.io/issues/189","id":392329589,"user":{"login":"nicolodavis","id":236078,"avatar_url":"https://avatars1.githubusercontent.com/u/236078?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolodavis","html_url":"https://github.com/nicolodavis","followers_url":"https://api.github.com/users/nicolodavis/followers","following_url":"https://api.github.com/users/nicolodavis/following{/other_user}","gists_url":"https://api.github.com/users/nicolodavis/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolodavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolodavis/subscriptions","organizations_url":"https://api.github.com/users/nicolodavis/orgs","repos_url":"https://api.github.com/users/nicolodavis/repos","events_url":"https://api.github.com/users/nicolodavis/events{/privacy}","received_events_url":"https://api.github.com/users/nicolodavis/received_events","type":"User","site_admin":false},"created_at":"2018-05-27T13:03:47Z","updated_at":"2018-05-27T13:03:47Z","author_association":"COLLABORATOR","body":"This is ready to be merged (all looks good to me), except for the example, which still doesn't work as expected. I'll merge it in once we resolve that."}}
{"actor":{"display_login":"nicolodavis"}}