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 leaderboards
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": "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": "2bd5f846-ce1d-45be-998e-26d2e97b7f68"
, "wellId": "588ad177-83ca-4a5f-9672-bf97783ea42f" }
# Claim a stake
POST http://localhost:3000/api/user/:user_id/stakes/claim
:headers
{ "stakingEventId" : "e53ef75e-fbb8-453f-a55c-758683bb0bb4" }