Spyfall written in Go + React
{
"type":"createGame",
"data":{
"username":"jsmith",
}
}code: Optional. If specified, a game with the given code will be created.
{
"type":"destroyGame"
}{
"type":"joinGame",
"data": {
"code": "abc123",
"username": "jsmith"
}
}code: Required. The code of the game to join
username: Required. The your username.
{
"type":"leaveGame"
}{
"type":"createGame",
"data": {
"sucess": true,
"code":"abc123",
"error": "..."
}
}created: Always returned. Whether or not the game was sucessfully created.
code: Returned if created: true. The code of the game created.
error: Returned if created: false. The error if the game was not created.
{
"type":"destroyGame",
"data":{
"sucess": true,
"error": "..."
}
}destroyed: Always returned. Whether or not the game was sucessfully destroyed.
error: Returned if destroyed: false. The error if the game was not destroyed.
{
"type":"joinGame",
"data":{
"sucess": true,
"error": "..."
}
}joined: Always returned. Whether or not the client joined the game sucessfully.
error: Returned if joined: false. The error if the client was not able to join the game.
{
"type":"leaveGame",
"data":{
"sucess": true,
"error": "..."
}
}left: Always returned. Whether or not the client left the game sucessfully.
error: Returned if left: false. The error if the client was not able to leave the game.