-
Notifications
You must be signed in to change notification settings - Fork 1
CustomArmorsController
Mateusz Andrzejewski edited this page Jun 25, 2025
·
3 revisions
This page contains documentation for the CpRedCustomArmorsController class, which handles custom Armors management for Cyberpunk Red.
Base Path: /api/v1/authorized
Package: dev.goral.rpghandyhelper.rpgSystems.cpRed.custom.customArmors
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/customArmors/all |
Returns basic info about all available custom armors |
| GET | /rpgSystems/cpRed/customArmors/{armorId} |
Returns detailed information about a specific custom armor by ID |
| GET | /rpgSystems/cpRed/customArmors/game/{gameId} |
Returns basic info about all available custom armors by game ID |
| GET | /admin/rpgSystems/cpRed/customArmors/all |
Returns a full list of all custom armors types with administrative data |
| POST | /rpgSystems/cpRed/customArmors/add |
Adds a new custom armor type to the system |
| PUT | /rpgSystems/cpRed/customArmors/update/{armorId} |
Update custom armor data |
- gameId (Long): ID of the game this custom armor belongs to. Required.
- name (String): Name of the custom armor. Required.
-
type (String): Type of the custom armor. Possible values:
LEATHER,KEVLAR,LIGHT_ARMORJACK,BODYWEIGHT_SUIT,MEDIUM_ARMORJACK,HEAVY_ARMORJACK,FLAK,METALGEAR,BULLETPROOF_SHIELD. - armorPoints (Integer): Number of custom armor points. Required.
- penalty (Integer): Penalty to the character's actions when wearing this custom armor. Required.
- price (Integer): Price for custom 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 custom armor. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- customArmor (Object): A single custom armor object (if applicable).
- customArmorList (Array): List of custom armors (if applicable).
Method: GET
Path: /rpgSystems/cpRed/customArmors/all
{
"customArmors": [
{
"gameId": 1,
"name": "Stalowa zbroja",
"type": "BODYWEIGHT_SUIT",
"armorPoints": 4,
"penalty": 0,
"price": 1500,
"availability": "COSTLY",
"description": "Customowa zbroja wykonana na specjalne zamówienie."
},
{
"gameId": 1,
"name": "Pole siłowe",
"type": "BULLETPROOF_SHIELD",
"armorPoints": 20,
"penalty": 0,
"price": 15000,
"availability": "VERY_EXPENSIVE",
"description": "Customowe pole siłowe, które zapewnia doskonałą ochronę przed atakami."
}
],
"message": "Customowe pancerze zostały pobrane.",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in.
Method: GET
Path: /rpgSystems/cpRed/customArmors/{ArmorId}
{
"customArmor": {
"gameId": 1,
"name": "Stalowa zbroja",
"type": "BODYWEIGHT_SUIT",
"armorPoints": 4,
"penalty": 0,
"price": 1500,
"availability": "COSTLY",
"description": "Customowa zbroja wykonana na specjalne zamówienie."
},
"message": "Customowa zbroja została pobrana.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid custom armor ID. -
401 Unauthorized: User is not logged in. -
404 Not Found:Custom armor with the specified ID does not exist.
Method: GET
Path: /rpgSystems/cpRed/customArmors/game/{gameId}
{
"customArmor": [
{
"gameId": 1,
"name": "Stalowa zbroja",
"type": "BODYWEIGHT_SUIT",
"armorPoints": 4,
"penalty": 0,
"price": 1500,
"availability": "COSTLY",
"description": "Customowa zbroja wykonana na specjalne zamówienie."
},
{
"gameId": 1,
"name": "Pole siłowe",
"type": "BULLETPROOF_SHIELD",
"armorPoints": 20,
"penalty": 0,
"price": 15000,
"availability": "VERY_EXPENSIVE",
"description": "Customowe pole siłowe, które zapewnia doskonałą ochronę przed atakami."
}
],
"message": "Customowe zbroje do gry zostały pobrane.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid game ID. -
401 Unauthorized: User is not logged in. -
404 Not Found: Game with the specified ID does not exist.
Method: GET
Path: admin/rpgSystems/cpRed/customArmors/all
{
"customArmors": [],
"message": "Customowe pancerze zostały pobrane dla administratora.",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in. -
403 Forbidden: User is not an admin.
Method: POST
Path: /admin/rpgSystems/cpRed/customArmors/add
{
"gameId": 1,
"name": "Pancerz własny",
"type": "LEATHER",
"armorPoints": 2,
"penalty": 0,
"price": 100,
"availability": "CHEAP",
"description": "Pancerz skórzany"
}{
"message": "Customowy pancerz został dodany.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: User not authenticated. -
401 Unauthorized: User not logged in. -
404 Not Found: Invalid custom armor data.
Method: PUT
Path: /admin/rpgSystems/cpRed/customArmors/update/{ArmorsId}
{
"gameId": 1,
"name": "Pancerz własny 2.0",
"type": "LEATHER",
"armorPoints": 3,
"penalty": 1,
"price": 150,
"availability": "CHEAP",
"description": "Lepszy pancerz skórzany"
}{
"message": "Customowy pancerz został zmodyfikowany.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid custom armor ID or data. -
401 Unauthorized: User not logged in. -
404 Not Found:Custom 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