Skip to content

This is the software project of 3rd semester software engineering

Notifications You must be signed in to change notification settings

ldehner/SWEN1-MonsterTradingCardsGame

Repository files navigation

Linus Dehner

Monster Trading Cards Game

Routes

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"

User

Register POST

/users

Body:

{
    "Username": "...",
    "Password": "..."
}

Login POST

/sessions

Body:

{
    "Username": "...",
    "Password": "..."
}

Logout POST

/logout

Get User Data GET

/users/{user}

Update User Data PUT

/users/{user}

Body:

{
    "Name": "...",
    "Bio": "...",
    "Image": "..."
}

Packages

Add Package (Admin) POST

/packages

Body:

[
    {"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}
]

Aquire Package POST

/transactions/packages

Cards

Get Cards GET

/cards

Get Deck GET

/deck

Get Deck Plain Text GET

/deck?format=plain

Set Deck PUT

/deck

Body:

[
	"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.

Trade

List Trades GET

/tradings

Create Trade POST

/tradings

Body:

{
    "Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "CardToTrade": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "Type": "Desired Type -> Monster/Spell",
    "MinimumDamage": 10.0
}

Accept Trade POST

/tradings/{tradeId}

Body:

"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

*Id of the card user wants to trade

Delete Trade DELETE

/tradings/{tradeId}

Battle

Start Battle POST

/battles

List Battles GET

/battles

Get Battle GET

/battles/{battleId}

About

This is the software project of 3rd semester software engineering

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages