-
GET
/nft/hero/get- Return hero inforamtion.
- path params:
- query params:
idinteger, required: id of hero
- Response sample: (application/json)
{ "id": 1, "name": "Morgul", "rarirty": "Epic" } - Responses:
200: success400: incorrectid404: problems
- Return hero inforamtion.
-
GET
/nft/hero/get-
Return hero inforamtion.
- path params:
- query params:
idinteger, required: id of hero
-
Response sample: (application/json)
{ "id": 1, "name": "Morgul", "rarirty": "Epic" } -
Responses:
200: success400: incorrectid404: problems
-
-
GET
/nft/hero/getall-
Return all hero inforamtion from
offsettooffset + limit.- path params:
- query params:
limitinteger, optional (by default-1, return all): max lengths of returned listoffsetinteger, optional (by default0): offset from zero
-
Response sample: (application/json)
[ { "id": 1, "name": "Morgul", "rarirty": "Epic" }, { "id": 3, "name": "Trom", "rarirty": "Legendary" } ] -
Responses:
200: success400: incorrectlimitoroffset404: problems
-
-
POST
/nft/hero/create- Create hero with provided data
- path params:
- query params:
- body: (application/json)
{ "name": "Winchester", "rarity": "Rare" }
- Response sample: (application/json)
{ "id": 2, "name": "Winchester", "rarity": "Rare" } - Responses:
200: success400: bad fields404: problems
- Create hero with provided data
-
DELETE
/nft/hero/remove- Remove hero with id
id- path params:
- query params:
idinteger, required: id of hero
- Response sample: (application/json)
{ "id": 1, "name": "Morgul", "rarirty": "Epic" } - Responses:
200: success400: incorrectid404: problems
- Remove hero with id
-
GET
/nft/item/get-
Return item inforamtion.
- path params:
- query params:
idinteger, required: id of item
-
Response sample: (application/json)
{ "id": 1, "name": "Telescope", "max_level": 3 } -
Responses:
200: success400: incorrectid404: problems
-
-
GET
/nft/item/getall-
Return all items inforamtion from
offsettooffset + limit.- path params:
- query params:
limitinteger, optional (by default-1, return all): max lengths of returned listoffsetinteger, optional (by default0): offset from zero
-
Response sample: (application/json)
[ { "id": 1, "name": "Telescope", "max_level": 3 }, { "id": 3, "name": "Revolver", "max_level": 5 } ] -
Responses:
200: success400: incorrectlimitoroffset404: problems
-
-
POST
/nft/item/create-
Create item with provided data.
- path params:
- query params:
- body: (application/json)
{ "name": "Gun", "max_level": 4 } -
Response sample: (application/json)
{ "id": 2, "name": "Gun", "max_level": 4 } -
Responses:
200: success400: bad fields404: problems
-
-
DELETE
/nft/item/remove-
Remove item with id
id- path params:
- query params:
idinteger, required: id of item
-
Response sample: (application/json)
{ "id": 2, "name": "Gun", "max_level": 4 } -
Responses:
200: success400: incorrectid404: problems
-
-
GET
/nft/spaceship/get-
Return spaceship inforamtion.
- path params:
- query params:
idinteger, required: id of spaceship
-
Response sample: (application/json)
{ "id": 1, "name": "Starracer", "max_slots": 33 } -
Responses:
200: success400: incorrectid404: problems
-
-
GET
/nft/spaceship/getall-
Return all spaceships inforamtion from
offsettooffset + limit.- path params:
- query params:
limitinteger, optional (by default-1, return all): max lengths of returned listoffsetinteger, optional (by default0): offset from zero
-
Response sample: (application/json)
[ { "id": 1, "name": "Starracer", "max_slots": 33 }, { "id": 3, "name": "SpaceX", "max_slots": 49 } ] -
Responses:
200: success400: incorrectlimitoroffset404: problems
-
-
POST
/nft/spaceship/create-
Create spaceship with provided data
- path params:
- query params:
- body: (application/json)
{ "name": "Craftship", "max_slots": 45 }
-
Response sample: (application/json)
{ "id": 2, "name": "Craftship", "max_slots": 45 } -
Responses:
200: success400: bad fields404: problems
-
-
DELETE
/nft/spaceship/remove- Remove spaceship with id
id- path params:
- query params:
idinteger, required: id of spaceship
- body:
- Response sample: (application/json)
{ "id": 2, "name": "Craftship", "max_slots": 45 } - Responses:
200: success400: incorrectid404: problems
- Remove spaceship with id
-
GET
/player/inventory/{type}-
Return list of object with
type- path params:
typestring, required (hero|item|spaceship): type of object
- path params:
-
query params:
addressstring, required: address of player in blockchaincompactinteger, optional (by default = 0): return IDs of object ifcompact= 1, and FULL ifcompact= 0limitinteger, optional (by default-1, return all): max lengths of returned listoffsetinteger, optional (by default0): offset from zero
-
Response sample: (application/json)
[ { "id": 1, "name": "Starracer", "slots": 30 }, { "id": 1, "name": "Starracer", "slots": 21 }, { "id": 2, "name": "Craftship", "slots": 20 }, { "id": 3, "name": "SpaceX", "slots": 15 } ][ { "id": 1, "name": "Telescope", "level": 1 }, { "id": 3, "name": "Revolver", "level": 2 } ] -
Responses:
200: success400: incorrect query pramas404: problems
-
-
POST
/player/craft/{type}-
Consumes from player two objects and give him third one
-
path param:
typestring, required (spacehip): type of object
-
query params:
addressstring, required: address of player in blockchain
-
body: (application/json)
[ { "id": 2, "name": "Craftship", "max_slots": 45 }, { "id": 3, "name": "SpaceX", "max_slots": 10 }, { "id": 2, "name": "Craftship", "max_slots": 50 } ]
-
-
Response sample: (application/json)
{ "id": 2, "name": "Craftship", "max_slots": 50 } -
Responses:
200: success400: incorrect pramas404: problems
-
-
POST
/player/reward-
Consumes from player two objects and give him third one
-
path param:
-
query params:
addressstring, required: address of player in blockchain
-
body: (application/json)
{ "reward": "1000000000000000000" // amount of tokens in uint }
-
-
Response sample: (application/json)
-
Responses:
200: success400: incorrect pramas404: problems
-