-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from chesslablab/issue/147-Document-the-accep…
…t-command Issue/147 document the accept command
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# /accept | ||
|
||
## Description | ||
|
||
Accepts an invitation code to play chess online with an opponent. | ||
|
||
## Parameters | ||
|
||
| Name | Description | Required | | ||
| ---- | ----------- | -------- | | ||
| hash | The unique hash of the game. | Yes | | ||
|
||
## Usage | ||
|
||
### Example | ||
|
||
```js | ||
ws.send('/accept 15f78c0035a719491b89522b4905a490'); | ||
``` | ||
|
||
```text | ||
{ | ||
"/accept": { | ||
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwY2hlc3MubmV0IiwiaWF0IjoxNjk0NDQxOTcxLCJleHAiOjE2OTQ0NDU1NzEsInZhcmlhbnQiOiJjbGFzc2ljYWwiLCJzdWJtb2RlIjoiZnJpZW5kIiwiY29sb3IiOiJ3IiwibWluIjo1LCJpbmNyZW1lbnQiOjMsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.POuK_cR3U_bblLa8LFyGg1AJEE5_iW_AquuNn7K4qHI", | ||
"hash": "15f78c0035a719491b89522b4905a490", | ||
"timer": { | ||
"w": 300, | ||
"b": 300 | ||
}, | ||
"startedAt": 1694441992 | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters