CharacterClassesController - xEdziu/RPG-Handy-Helper GitHub Wiki
This page contains documentation for the CpRedCharacterClassesController
class, which handles character classes management for Cyberpunk Red.
Base Path: /api/v1/authorized
Package: dev.goral.rpgSystems.cpRed.characters.characterClasses
All requests to this controller require an XSRF token to be included in the headers.
Example:
headers: {
"X-XSRF-TOKEN": "<csrfToken>"
}
HTTP Method | Path | Description |
---|---|---|
GET | /games/cpRed/characters/classes/{characterId} |
Returns detailed information about a specific character class by characterID |
POST | /games/cpRed/characters/classes/create |
Adds a new connection between class type and character to the system |
PUT | /games/cpRed/characters/classes/update/{characterClassId} |
Update character class data |
DELETE | /games/cpRed/characters/classes/delete/{characterClassId} |
Delete character class data |
GET | /admin/games/cpRed/characters/classes/all |
Returns a full list of character class type with administrative data |
- Id (Long): Unique identifier for the character class. Required.
- classLevel (Short): Level of the character class. Required.
- CharacterId (Long): Unique identifier for the character. Required.
- classId (Long): Unique identifier for the class type. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- characterClass (Object): A single character class object (if applicable).
- characterClassList (Array): List of character classes (if applicable).
Method: GET
Path: /games/cpRed/characters/classes/{characterId}
{
"characterClass": [],
"message": "Klasy postaci pobrane pomyślnie",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: Invalid Character ID. -
401 Unauthorized
: User is not logged in. -
404 Not Found
: Character with the specified ID does not exist.
Method: POST
Path: /games/cpRed/characters/classes/create
{
"classLevel": 1,
"characterId": 1,
"classId": 1
}
{
"message": "Klasa postaci została pomyślnie utworzona",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: User not authenticated. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Invalid character class data.
Method: PUT
Path: /games/cpRed/characters/classes/update/{characterClassId}
{
"classLevel": 5
}
{
"message": "Klasa postaci została pomyślnie zaktualizowana",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: Invalid character class ID or data. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Character class with the specified ID does not exist.
Method: DELETE
Path: /games/cpRed/characters/classes/delete/{characterClassId}
{
"message": "Klasa postaci została pomyślnie usunięta",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: Invalid character class ID. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Character class with the specified ID does not exist.
Method: GET
Path: /admin/games/cpRed/characters/classes/all
{
"characterClass": [],
"message": "Wszystkie klasy każdej postaci pobrane pomyślnie",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized
: User is not logged in. -
403 Forbidden
: User is not an admin.
-
Missing XSRF Token: Ensure the
X-XSRF-TOKEN
header is included in every request. - Invalid Fields: Double-check the request body for missing or invalid fields.
- Permission Issues: Verify that the user has the necessary permissions for the requested operation.