Players
Allows a player to be created without having gone through registration, enabling a frictionless first time user experience including asset ownership.
Identifier for the environment that this request should interact with
A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID
POST /v1/players HTTP/1.1
Host:
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
x-idempotency-key: text
Accept: */*
Success
{
"id": "8778f02d-5193-4ab1-ae15-f18e091f38e1"
}
Retrieve a single player by their id.
Identifier for the environment that this request should interact with
GET /v1/players/{playerId} HTTP/1.1
Host:
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
"id": "8778f02d-5193-4ab1-ae15-f18e091f38e1"
}
Player linking allows a player to be connected to a Mythical account and wallet. This allows players to progress and acquire on-chain assets and then link those to a Mythical account for marketplace trading. Linking a player is a one time operation that cannot be reversed. Only one player (per environment) can be linked to a Mythical account.
The identifier of the player to be linked.
Identifier for the environment that this request should interact with
A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID
bearer token for the registered Mythical account
POST /v1/players/{playerId}/link HTTP/1.1
Host:
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
x-idempotency-key: text
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"registeredAccountJwt": "jwt"
}
No content
Retrieves a list of items owned by a given player.
Identifier for the environment that this request should interact with
GET /v1/players/{playerId}/items HTTP/1.1
Host:
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
Success
[
{
"id": "text",
"itemTypeId": "text",
"ownerPlayerId": "text",
"tokenId": 1,
"state": "pending",
"metadataUrl": "http://url.com/1",
"metadata": {
"name": "text",
"description": "text",
"image": "text",
"attributes": [
{
"type": "attributeName",
"value": "attrValue",
"displayType": "number, boolean, string",
"maxValue": 255
}
]
},
"tags": [
"text"
]
}
]
Last updated