WeaponModsCompatibilityController - xEdziu/RPG-Handy-Helper GitHub Wiki
This page contains documentation for the CpRedModWeaponCompatibilityController
class, which handles weapon mods compatibility management for Cyberpunk Red.
Base Path: /api/v1/authorized
Package: `dev.goral.rpghandyhelper.rpgSystems.cpRed.compatibility.weaponMod;
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 | /compatibility/mod/all |
Returns basic info about all weapon mod compatibility |
GET | /compatibility/mod/{id} |
Returns detailed information about a specific weapon mod compatibility by ID |
GET | /compatibility/mod/forWeapon |
Returns a list of all weapon mod compatibility by weapon |
GET | /compatibility/mod/forMod |
Returns a list of all weapon mod compatibility by mod |
POST | /compatibility/mod/add |
Adds a new weapon mod compatibility type to the system |
PUT | /compatibility/mod/update/{id} |
Update weapon mod compatibility data |
- Id (Long): Unique identifier for the weapon compatibility. Required.
- weaponId (Long): ID of the weapon this weapon is compatible with. Required.
- modId (Long): ID of the mod this compatibility applies to. Required.
- isWeaponCustom (Boolean): Indicates if the weapon is custom. Required.
- isModCustom (Boolean): Indicates if the mod is custom. Required.
- message (String): Describes the result of the operation.
- error (Integer): HTTP status code.
- timestamp (String): Time the response was generated.
- weaponCompatibility (Object): A single weapon mod compatibility object (if applicable).
- weaponCompatibilityList (Array): List of weapons mod compatibility (if applicable).
Method: GET
Path: /compatibility/mod/all
{
"weaponModCompatibility": [],
"message": "Lista kompatybilności modyfikacji została pobrana",
"error": 200,
"timestamp": "..."
}
-
401 Unauthorized
: User is not logged in.
Method: GET
Path: /compatibility/mod/{id}
{
"weaponModCompatibility": {
"id": 1,
"weaponId": 1,
"modId": 1,
"weaponCustom": true,
"modCustom": true
},
"message": "Kompatybilność modyfikacji została pobrana",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: Invalid weapon compatibility ID. -
401 Unauthorized
: User is not logged in. -
404 Not Found
: Weapon mod compatibility with the specified ID does not exist.
Method: GET
Path: /compatibility/mod/forWeapon
{
"weaponId": 1,
"weaponCustom": true
}
{
"weaponModCompatibility": [
{
"id": 1,
"weaponId": 1,
"modId": 1,
"weaponCustom": true,
"modCustom": true
}
],
"message": "Kompatybilność modyfikacji dla broni została pobrana",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: User not authenticated. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Invalid weapon data.
Method: GET
Path: /compatibility/mod/forMod
{
"modId": 1,
"modCustom": true
}
{
"weaponModCompatibility": [
{
"id": 1,
"weaponId": 1,
"modId": 1,
"weaponCustom": true,
"modCustom": true
}
],
"message": "Kompatybilność modyfikacji dla broni została pobrana",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: User not authenticated. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Invalid mod data.
Method: POST
Path: /compatibility/mod/add
{
"modId": 1,
"weaponId": 1,
"weaponCustom": true,
"modCustom": true
}
{
"message": "Kompatybilność modyfikacji została dodana.",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: User not authenticated. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Invalid weapon mod compatibility data.
Method: PUT
Path: /compatibility/mod/update/{id}
{
"modId": 1,
"weaponId": 1,
"weaponCustom": false,
"modCustom": false
}
{
"message": "Kompatybilność modyfikacji została zmieniona.",
"error": 200,
"timestamp": "..."
}
-
400 Bad Request
: Invalid weapon compatibility ID or data. -
401 Unauthorized
: User not logged in. -
404 Not Found
: Weapon mod compatibility with the specified ID does not exist.
-
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.