MoonMiners/test-endpoints.restclient

87 lines
1.9 KiB
Plaintext

:headers = <<
Content-Type: application/json
#
:user_id = 595ab570-fa74-4c6c-980e-4c80d1064dd1
:host = https://moonminers.app/api
# 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 leaderboards
GET :host/leaderboards
:headers
# Get Inventory Items
POST :host/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 game config
GET http://localhost:3000/api/get-game-config
: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": "2bd5f846-ce1d-45be-998e-26d2e97b7f68" }
# 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": "1db181dd-320f-4525-a00d-933e5d72d690"
, "wellId": "0a7fd54d-02cf-4c08-b106-6f812ad4b1ca" }
# Claim a stake
POST http://localhost:3000/api/user/:user_id/stakes/claim
:headers
{ "stakingEventId" : "e53ef75e-fbb8-453f-a55c-758683bb0bb4" }