2018-04-01 15:12:24 +02:00
|
|
|
### List Decorations [GET /decorations{?q,fractFilter}]
|
2018-03-19 20:32:59 +01:00
|
|
|
|
|
|
|
List all decorations
|
|
|
|
|
|
|
|
+ Parameters
|
2018-03-29 22:14:04 +02:00
|
|
|
+ q: `tapferkeit` (string, optional)
|
2018-03-19 20:32:59 +01:00
|
|
|
Filter string for the partial decoration name
|
|
|
|
|
2018-03-29 22:14:04 +02:00
|
|
|
+ fractFilter: `BLUFOR` (enum[string], optional)
|
2018-03-19 20:32:59 +01:00
|
|
|
Field to filter by fraction
|
|
|
|
|
|
|
|
+ Members
|
|
|
|
+ `BLUFOR`
|
|
|
|
+ `OPFOR`
|
|
|
|
+ `GLOBAL`
|
|
|
|
|
2018-04-01 15:12:24 +02:00
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
2018-03-19 20:32:59 +01:00
|
|
|
|
2018-03-29 22:14:04 +02:00
|
|
|
+ Attributes (array[Decoration], fixed-type)
|
|
|
|
|
|
|
|
|
2018-04-01 15:12:24 +02:00
|
|
|
### Get Decoration [GET /decorations/{id}]
|
2018-03-29 22:14:04 +02:00
|
|
|
|
|
|
|
Retrieve single decoration data
|
|
|
|
|
|
|
|
+ Parameters
|
|
|
|
+ id: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration to fetch
|
|
|
|
|
2018-04-01 15:12:24 +02:00
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
2018-03-29 22:14:04 +02:00
|
|
|
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
2018-03-31 00:14:30 +02:00
|
|
|
|
|
|
|
### Create Decoration [POST /decorations]
|
|
|
|
|
|
|
|
Create a new decoration
|
|
|
|
|
2018-04-02 10:28:20 +02:00
|
|
|
**Permission: 2**
|
2018-04-01 16:32:44 +02:00
|
|
|
|
2018-03-31 00:14:30 +02:00
|
|
|
+ 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--
|
|
|
|
|
2018-04-01 15:12:24 +02:00
|
|
|
+ Response 201 (application/json; charset=utf-8)
|
2018-03-31 00:14:30 +02:00
|
|
|
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
|
|
|
|
2018-03-31 12:05:37 +02:00
|
|
|
### Update Decoration [PATCH /decorations/{id}]
|
2018-03-31 00:14:30 +02:00
|
|
|
|
|
|
|
Update decoration, identified by its id
|
|
|
|
|
2018-04-02 10:28:20 +02:00
|
|
|
**Permission: 2**
|
2018-04-01 16:32:44 +02:00
|
|
|
|
2018-03-31 00:14:30 +02:00
|
|
|
+ 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--
|
|
|
|
|
2018-04-01 15:12:24 +02:00
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
2018-03-31 00:14:30 +02:00
|
|
|
|
|
|
|
+ Attributes (Decoration, fixed-type)
|
|
|
|
|
|
|
|
### Delete Decoration [DELETE /decorations/{id}]
|
|
|
|
|
|
|
|
Delete a decoration
|
|
|
|
|
2018-04-02 10:28:20 +02:00
|
|
|
**Permission: 2**
|
2018-04-01 16:32:44 +02:00
|
|
|
|
2018-03-31 00:14:30 +02:00
|
|
|
+ Parameters
|
|
|
|
+ id: `5abeb43cb987672bb1ede644` (string, required) - unique id of the decoration
|
|
|
|
|
|
|
|
+ Response 204
|