-
Notifications
You must be signed in to change notification settings - Fork 1
EquipmentsController
Mateusz Andrzejewski edited this page Jun 25, 2025
·
5 revisions
This page contains documentation for the CpRedEquipmentsController, which manages equipment items in the Cyberpunk Red.
Base Path: /api/v1/authorized
Package: dev.goral.rpghandyhelper.rpgSystems.cpRed.manual.equipments
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/equipments/all |
Returns basic info about all available equipments |
| GET | /rpgSystems/cpRed/equipments/{equipmentId} |
Returns detailed information about a specific equipment by ID |
| GET | /admin/rpgSystems/cpRed/equipments/all |
Returns a full list of all equipments types with administrative data |
| POST | /admin/rpgSystems/cpRed/equipments/add |
Adds a new equipment type to the system |
| PUT | /admin/rpgSystems/cpRed/equipments/update/{equipmentId} |
Update equipment data |
- name (String): Name of the equipment. Required.
- price (Integer): Price for equipment 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 equipment. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- equipment (Object): A single equipment object (if applicable).
- equipmentList (Array): List of equipments (if applicable).
Method: GET
Path: /rpgSystems/cpRed/equipments/all
{
"equipments": [
{
"name": "item",
"price": 100,
"availability": "CHEAP",
"description": "A cheap item"
}
],
"message": "Wyposażenie zostało pobrane.",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in.
Method: GET
Path: /rpgSystems/cpRed/equipments/{equipmentId}
{
"equipment": {
"name": "item",
"price": 100,
"availability": "CHEAP",
"description": "A cheap item"
},
"message": "Pobrano przedmiot.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid equipment ID. -
401 Unauthorized: User is not logged in. -
404 Not Found: Equipment with the specified ID does not exist.
Method: GET
Path: admin/rpgSystems/cpRed/equipments/all
{
"equipments": [
{
"id": 1,
"name": "item",
"price": 100,
"availability": "CHEAP",
"description": "A cheap item"
}
],
"message": "Wyposażenie zostało pobrane.",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized: User is not logged in. -
403 Forbidden: User is not an admin.
Method: POST
Path: /admin/rpgSystems/cpRed/equipment/add
{
"name": "item",
"price": 100,
"availability": "CHEAP",
"description": "A cheap item"
}{
"message": "Przedmiot item 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 equipment data.
Method: PUT
Path: /admin/rpgSystems/cpRed/cyberwares/equipment/{equipmentId}
{
"name": "new item",
"price": 130,
"availability": "CHEAP",
"description": "Better item"
}{
"message": "Przedmiot został zaktualizowany.",
"error": 200,
"timestamp": "..."
}-
400 Bad Request: Invalid equipment ID or data. -
401 Unauthorized: User not logged in. -
403 Forbidden: User is not an admin. -
404 Not Found: Equipment 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