Dodać API
-
GET - Pobieranie danych o użytkowniku
https://v4.api.mganczarczyk.pl/v4/projekt-p2/{uuid}
- Response 200, użytkownik istnieje JSON:
-
username- string
-
level- int
-
xp- int
-
smallPotions- int
-
bigPotions- int
-
money- float
-
weapon_critChance- float
-
weapon_baseDamage- float
-
weapon_price- float
-
armor_baseProtection- float
-
armor_price- float
-
armor_name- string
-
- Response 200, użytkownik istnieje JSON:
{
"username": "Marcel",
"level": 6,
"xp": 28,
"money": 5.3,
"weapon_critChance": 3.5,
"weapon_baseDamage": 3.5,
"weapon_price": 3.5,
"armor_baseProtection": 3.5,
"armor_price": 3.5,
"armor_name": "Skorzana zbroja",
"smallPotions": 0,
"bigPotions": 3
}
- Response 200, użytkownik nie istnieje JSON:
[]
-
POST - Tworzenie, aktuzlizowanie użytkownika
https://v4.api.mganczarczyk.pl/v4/projekt-p2/{uuid}
- Body:
-
username- string
- < 25 znaków
-
level- int
-
xp- int
-
smallPotions- int
-
bigPotions- int
-
money- float
-
weapon_critChance- float
-
weapon_baseDamage- float
-
weapon_price- float
-
armor_baseProtection- float
-
armor_price- float
-
armor_name- string
-
- Response:
- To samo, co w GET
- Body: