-
Notifications
You must be signed in to change notification settings - Fork 1
ClassesController
Mateusz Andrzejewski edited this page Jun 23, 2025
·
6 revisions
This page contains documentation for the CpRedClassesController class, which handles classes management for Cyberpunk Red.
Base Path: /api/v1/authorized
Package: dev.goral.rpghandyhelper.rpgSystems.cpRed.manual.classes
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 | /rpgSystems/cpRed/classes/all |
Returns basic info about all available classes |
| GET | /rpgSystems/cpRed/classes/{clasId} |
Returns detailed information about a specific class by ID |
| GET | /admin/rpgSystems/cpRed/classes/all |
Returns a full list of all classes types with administrative data |
| POST | /admin/rpgSystems/cpRed/classes/add |
Adds a new class type to the system |
| PUT | /admin/rpgSystems/cpRed/classes/update/{classId} |
Update class data |
- name (String): Name of the class. Required.
- description (String): Description of the class. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- classes (Object): A single class object (if applicable).
- classesList (Array): List of classes (if applicable).
Method: GET
Path: /rpgSystems/cpRed/classes/all
{
"classes": [
{
"name": "Kowal",
"description": "Kuje przedmioty"
}
],
"message": "Pobrano klasy",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in.
Method: GET
Path: /rpgSystems/cpRed/classes/{classId}
{
"message": "Pobrano klasę",
"error": 200,
"class": {
"name": "Kowal",
"description": "Kuje przedmioty"
},
"timestamp": "..."
}-
400 Bad Request: Invalid classes ID. -
401 Unauthorized: User is not logged in. -
404 Not Found: class with the specified ID does not exist.
Method: GET
Path: admin/rpgSystems/cpRed/classes/all
{
"classes": [
{
"id": 1,
"name": "Kowal",
"description": "Kuje przedmioty"
}
],
"message": "Pobrano klasy",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in. -
403 Forbidden: User is not an admin.
Method: POST
Path: /admin/rpgSystems/cpRed/classes/add
{
"name": "Kowal",
"description": "Kuje przedmioty"
}{
"message": "Klasa Kowal została dodana",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: User not authenticated. -
401 Unauthorized: User not logged in. -
403 Forbidden: User is not an admin. -
404 Not Found: Invalid class data.
Method: PUT
Path: /admin/rpgSystems/cpRed/classes/update/{classId}
{
"name": "Nowy Kowal",
"description": "Kuje lepsze przedmioty"
}{
"message": "Klasa Nowy Kowal została zaktualizowana",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid classes ID or data. -
401 Unauthorized: User not logged in. -
403 Forbidden: User is not an admin. -
404 Not Found: class with the specified ID does not exist.
-
Missing XSRF Token: Ensure the
X-XSRF-TOKENheader 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.
-
Home
- GameNoteController
- SchedulerController
- UserController
- ForgotPasswordController
- RegisterController
- RpgSystemsController
- GameController
- GameRoomController
- AmmunitionController
- ArmorsController
- ClassesController
- CriticalInjuriesController
- CyberwaresController
- EquipmentsController
- SkillsController
- StatsController
- WeaponsController
- WeaponModsController
- CustomAmmunitionController
- CustomArmorsController
- CustomCriticalInjuriesController
- CustomCyberwaresController
- CustomEquipmentsController
- CustomWeaponModsController
- CustomWeaponsController
- CharacterAmmunitionController
- CharacterArmorController
- CharacterClassesController
- CharacterCriticalInjuriesController
- CharacterCustomAmmunitionController
- CharacterCustomArmorsController
- CharacterCustomCriticalInjuriesController
- CharacterCustomCyberwareController
- CharacterCustomEquipmentController
- CharacterCustomWeaponController
- CharacterCyberwareController
- CharacterEnemiesController
- CharacterEquipmentController
- CharacterFriendsController
- CharacterLifePathController
- CharacterOtherInfoController
- CharacterSkillsController
- CharacterStatsController
- CharacterTragicLoveStoryController
- CharacterWeaponsController
- CharacterWeaponModsController