MoonMiners/test-endpoints.restclient

82 lines
1.8 KiB
Plaintext

:headers = <<
Content-Type: application/json
#
:user_id = 595ab570-fa74-4c6c-980e-4c80d1064dd1
# Seed the SQLite database (deprecated)
GET http://localhost:3000/api/seed
:headers
# Call the import_config() stored procedure
POST http://localhost:3000/api/import-config
:headers
# Get Inventory Items
POST http://localhost:3000/api/user/login
:headers
{ "wallet" : "Wallet12345678" }
# Get bank account
GET http://localhost:3000/api/user/:user_id/account
:headers
# Sell a resource
PUT http://localhost:3000/api/user/:user_id/account
:headers
{
"pairs": [
{
"resourceType": "Sollux",
"resourceAmount": 100
},
{
"resourceType": "Novafor",
"resourceAmount": 100
}
]
}
# Clear user data
POST http://localhost:3000/api/user/:user_id/clear-data
:headers
# Get bank account
GET http://localhost:3000/api/leaderboards
:headers
# Get Staking Sources
GET http://localhost:3000/api/user/:user_id/staking-sources
:headers
# Create a new staking source
POST http://localhost:3000/api/user/:user_id/staking-sources
:headers
# Get Inventory Items
GET http://localhost:3000/api/user/:user_id/inventory-items
:headers
# Buy a new Item
POST http://localhost:3000/api/user/:user_id/inventory-items/
:headers
{ "storeItemId" : 1 }
# Upgrade an owned item
PUT http://localhost:3000/api/user/:user_id/inventory-items/
:headers
{ "inventoryItemId": "26e4b397-2b01-4c73-a14e-4ea4ae3ec1a5" }
# Get stakes
GET http://localhost:3000/api/user/:user_id/stakes/
:headers
# Start a stake
POST http://localhost:3000/api/user/:user_id/stakes/start
:headers
{ "inventoryItemId": "26e4b397-2b01-4c73-a14e-4ea4ae3ec1a5"
, "wellId": "ea4ad43c-d153-4fd4-819d-3c0339102d1e" }
# Claim a stake
POST http://localhost:3000/api/user/:user_id/stakes/claim
:headers
{ "stakingEventId" : "e53ef75e-fbb8-453f-a55c-758683bb0bb4" }