-
Notifications
You must be signed in to change notification settings - Fork 1
ArmorsController
Mateusz Andrzejewski edited this page Jun 23, 2025
·
6 revisions
This page contains documentation for the CpRedArmorsController class, which handles armors management for Cyberpunk Red.
Base Path: /api/v1/authorized
Package: dev.goral.rpghandyhelper.rpgSystems.cpRed.manual.armors
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/armors/all |
Returns basic info about all available armors |
| GET | /rpgSystems/cpRed/armors/{armorId} |
Returns detailed information about a specific armor by ID |
| GET | /admin/rpgSystems/cpRed/armors/all |
Returns a full list of all armors types with administrative data |
| POST | /admin/rpgSystems/cpRed/armors/add |
Adds a new armor type to the system |
| PUT | /admin/rpgSystems/cpRed/armors/update/{armorId} |
Update armor data |
-
type (String): Type of the armor. Possible values:
LEATHER,KEVLAR,LIGHT_ARMORJACK,BODYWEIGHT_SUIT,MEDIUM_ARMORJACK,HEAVY_ARMORJACK,FLAK,METALGEAR,BULLETPROOF_SHIELD. - armorPoints (Integer): Number of armor points. Required.
- penalty (Integer): Penalty to the character's actions when wearing this armor. Required.
- price (Integer): Price for armor in eurodollars. Required.
-
availability (String): Availability status. Required. Possible values:
CHEAP,EVERYDAY,COSTLY,PREMIUM,EXPENSIVE,VERY_EXPENSIVE,LUXURY,SUPER_LUXURY. - -description (String): Description of the armor. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- armor (Object): A single armor object (if applicable).
- armorsList (Array): List of armors (if applicable).
Method: GET
Path: /rpgSystems/cpRed/armors/all
{
"armors": [
{
"type": "KEVLAR",
"armorPoints": 5,
"penalty": 1,
"price": 100,
"availability": "CHEAP",
"description": "A lightweight armor made of Kevlar, providing decent protection against small arms fire."
}
],
"message": "Pobrano pancerze",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in.
Method: GET
Path: /rpgSystems/cpRed/armors/{armorId}
{
"armor": {
"type": "KEVLAR",
"armorPoints": 5,
"penalty": 1,
"price": 100,
"availability": "CHEAP",
"description": "A lightweight armor made of Kevlar, providing decent protection against small arms fire."
},
"message": "Pobrano pancerz",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid armor ID. -
401 Unauthorized: User is not logged in. -
404 Not Found: Armor with the specified ID does not exist.
Method: GET
Path: admin/rpgSystems/cpRed/armors/all
{
"armors": [
{
"id": 1,
"type": "KEVLAR",
"armorPoints": 5,
"penalty": 1,
"price": 100,
"availability": "CHEAP",
"description": "A lightweight armor made of Kevlar, providing decent protection against small arms fire."
}
],
"message": "Pobrano pancerze",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in. -
403 Forbidden: User is not an admin.
Method: POST
Path: /admin/rpgSystems/cpRed/armors/add
{
"type": "KEVLAR",
"armorPoints": 5,
"penalty": 1,
"price": 100,
"availability": "CHEAP",
"description": "A lightweight armor made of Kevlar, providing decent protection against small arms fire."
}{
"message": "Pancerz został dodany",
"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 armor data.
Method: PUT
Path: /admin/rpgSystems/cpRed/armors/update/{armorId}
{
"type": "KEVLAR",
"armorPoints": 6,
"penalty": 1,
"price": 120,
"availability": "CHEAP",
"description": "New armor."
}{
"message": "Pancerz został zaktualizowany",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid armor ID or data. -
401 Unauthorized: User not logged in. -
403 Forbidden: User is not an admin. -
404 Not Found: Armor 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