Players

Create Player

post

Creates a player with the given ID and an optional name. The ID must be unique, and ideally corresponds with a user ID used by the app integrating with 2bttns.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
idstringRequired

ID value. Only alphanumeric, underscore, and hyphen are allowed.

Pattern: ^[a-zA-Z0-9_-]+$
namestringOptional
Responses
200

Successful response

application/json
post
/players/create

Get All Players

get

Get all players

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful response

application/json
get
/players

Get Player Count

get

Get player count

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful response

application/json
get
/players/count

Get Player by ID

get

Get player by ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID value. Only alphanumeric, underscore, and hyphen are allowed.

Pattern: ^[a-zA-Z0-9_-]+$
Responses
200

Successful response

application/json
get
/players/{id}

Update Player by ID

put

Update player by ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID value. Only alphanumeric, underscore, and hyphen are allowed.

Pattern: ^[a-zA-Z0-9_-]+$
Body
Responses
200

Successful response

application/json
put
/players/{id}

Delete Player by ID

delete

Delete player by ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID value. Only alphanumeric, underscore, and hyphen are allowed.

Pattern: ^[a-zA-Z0-9_-]+$
Responses
200

Successful response

application/json
delete
/players/{id}

Was this helpful?