122 lines
3.0 KiB
Plaintext
122 lines
3.0 KiB
Plaintext
### GET Decorations [GET /decorations{?q,fractFilter}]
|
|
|
|
List all decorations
|
|
|
|
+ Parameters
|
|
+ q: `tapferkeit` (string, optional)
|
|
Filter string for the partial decoration name
|
|
|
|
+ fractFilter: `BLUFOR` (enum[string], optional)
|
|
Field to filter by fraction
|
|
|
|
+ Members
|
|
+ `BLUFOR`
|
|
+ `OPFOR`
|
|
+ `GLOBAL`
|
|
|
|
+ Response 200
|
|
|
|
+ Attributes (array[Decoration], fixed-type)
|
|
|
|
|
|
### GET Decoration [GET /decorations/{id}]
|
|
|
|
Retrieve single decoration data
|
|
|
|
+ Parameters
|
|
+ id: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration to fetch
|
|
|
|
+ Response 200
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
|
|
|
### Create Decoration [POST /decorations]
|
|
|
|
Create a new decoration
|
|
|
|
+ Request (multipart/form-data; boundary=---BOUNDARY)
|
|
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="name"
|
|
Content-Type: text/plain
|
|
|
|
Super medal 2000
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="fraction"
|
|
Content-Type: text/plain
|
|
|
|
OPFOR
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="description"
|
|
Content-Type: text/plain
|
|
|
|
For good performance in a battle
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="isMedal"
|
|
Content-Type: text/plain
|
|
|
|
true
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="image"; filename="image.png"
|
|
Content-Type: image/png
|
|
Content-Transfer-Encoding: base64
|
|
|
|
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlMA
|
|
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
|
|
-----BOUNDARY--
|
|
|
|
+ Response 201
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
|
|
|
### Update Decoration [PATCH /dcorations/{id}]
|
|
|
|
Update decoration, identified by its id
|
|
|
|
+ Parameters
|
|
+ id: `5abeb420b987672bb1ede643` (string, required) - unique id of the decoration
|
|
|
|
+ Request (multipart/form-data; boundary=---BOUNDARY)
|
|
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="name"
|
|
Content-Type: text/plain
|
|
|
|
Super medal 2000
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="fraction"
|
|
Content-Type: text/plain
|
|
|
|
OPFOR
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="description"
|
|
Content-Type: text/plain
|
|
|
|
For good performance in a battle
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="sortingNumber"
|
|
Content-Type: text/plain
|
|
|
|
2
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="image"; filename="image.png"
|
|
Content-Type: image/png
|
|
Content-Transfer-Encoding: base64
|
|
|
|
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlMA
|
|
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
|
|
-----BOUNDARY--
|
|
|
|
+ Response 200
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
|
|
|
### Delete Decoration [DELETE /decorations/{id}]
|
|
|
|
Delete a decoration
|
|
|
|
+ Parameters
|
|
+ id: `5abeb43cb987672bb1ede644` (string, required) - unique id of the decoration
|
|
|
|
+ Response 204
|