Linus Dehner
All routes are private except register and login. The private routes need authentification in form of a token with prefix "Basic", which is returned by a successful login.
--header "Authorization: Basic yourToken"/usersBody:
{
"Username": "...",
"Password": "..."
}/sessions
Body:
{
"Username": "...",
"Password": "..."
}/logout
/users/{user}/users/{user}Body:
{
"Name": "...",
"Bio": "...",
"Image": "..."
}/packagesBody:
[
{"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Name":"...", "Damage": 10.0},
{"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Name":"...", "Damage": 10.0},
{"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Name":"...", "Damage": 10.0},
{"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Name":"...", "Damage": 10.0},
{"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Name":"...", "Damage": 10.0}
]/transactions/packages/cards/deck/deck?format=plain/deckBody:
[
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
]*Id's of the four card's user wants in his deck.
/tradings/tradingsBody:
{
"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"CardToTrade": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Type": "Desired Type -> Monster/Spell",
"MinimumDamage": 10.0
}/tradings/{tradeId}Body:
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"*Id of the card user wants to trade
/tradings/{tradeId}/battles/battles/battles/{battleId}