List pending challenges
GET
/bot/challenges
const url = 'https://play-api.jc.id.lv/bot/challenges';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://play-api.jc.id.lv/bot/challenges \ --header 'Authorization: Bearer <token>'Every pending challenge involving the caller — in addressed to you, out yours.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Pending challenges.
Media typeapplication/json
object
in
required
Array<object>
object
id
required
string
challenger
required
target
required
timeControl
required
One of:
A single-key time-control wrapper.
object
Unlimited
required
object
A single-key time-control wrapper.
object
SuddenDeath
required
object
initialSeconds
required
integer
A single-key time-control wrapper.
object
Fischer
required
object
initialSeconds
required
integer
incrementSeconds
required
integer
A single-key time-control wrapper.
object
PerMove
required
object
secondsPerMove
required
integer
targetOnline
Advisory — whether the target holds an account stream.
boolean
out
required
Array<object>
object
id
required
string
challenger
required
target
required
timeControl
required
One of:
A single-key time-control wrapper.
object
Unlimited
required
object
A single-key time-control wrapper.
object
SuddenDeath
required
object
initialSeconds
required
integer
A single-key time-control wrapper.
object
Fischer
required
object
initialSeconds
required
integer
incrementSeconds
required
integer
A single-key time-control wrapper.
object
PerMove
required
object
secondsPerMove
required
integer
targetOnline
Advisory — whether the target holds an account stream.
boolean
Examplegenerated
{ "in": [ { "id": "example", "challenger": { "Guest": { "id": "example" } }, "target": { "Guest": { "id": "example" } }, "timeControl": { "Unlimited": {} }, "targetOnline": true } ], "out": [ { "id": "example", "challenger": { "Guest": { "id": "example" } }, "target": { "Guest": { "id": "example" } }, "timeControl": { "Unlimited": {} }, "targetOnline": true } ]}