MoonMiners/test-endpoints.rest
Joseph Ferano 99bc7a319f Merge feature/api
* Added backend capabilities with SQLite3
* Added routes for Next.js backend
2023-03-19 10:21:19 +07:00

52 lines
1.0 KiB
ReStructuredText

:headers = <<
Content-Type: application/json
#
# Get Inventory Items
GET http://localhost:3000/api/seed
:headers
# Get Inventory Items
POST http://localhost:3000/api/user/login
:headers
{ "wallet" : "Wallet12345678" }
# Get Inventory Items
GET http://localhost:3000/api/user/1/bank-account
:headers
# Get Inventory Items
GET http://localhost:3000/api/user/1/staking-sources
:headers
# Get Inventory Items
POST http://localhost:3000/api/user/1/staking-sources
:headers
# Get Inventory Items
GET http://localhost:3000/api/user/1/inventory-items
:headers
# Buy a new Item
POST http://localhost:3000/api/user/1/inventory-items/
:headers
{ "itemId" : "item3" }
# Upgrade an owned item
PUT http://localhost:3000/api/user/1/inventory-items/
:headers
{ "itemId" : "item1" }
# Get stakes
GET http://localhost:3000/api/user/1/stakes/
:headers
# Start a stake
POST http://localhost:3000/api/user/1/stakes/start
:headers
{ "inventoryItemId": "item1", "wellId": 7 }
# Claim a stake
POST http://localhost:3000/api/user/1/stakes/claim
:headers
{ "stakingEventId" : 4 }