eventyay-tickets
eventyay-tickets copied to clipboard
Add orientation and height fields to Badgelayouts API response
The Badges plugin API currently returns the following JSON structure for badge layouts for the following call
GET /api/v1/organizers/(organizer)/events/(event)/badgelayouts/
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "event",
"default": true,
"layout": [
{
"type": "textarea",
"left": "13.09",
"bottom": "49.73",
"fontsize": "23.6",
"color": [
0,
0,
0,
1
],
"fontfamily": "Open Sans",
"bold": true,
"italic": false,
"width": "121.83",
"content": "attendee_name",
"text": "Max Mustermann",
"align": "center"
}
],
"background": null,
"item_assignments": []
}
]
}
Enhance this API response to include additional fields: orientation
and height
. This will help in defining the badge layout more precisely.
Proposed JSON structure:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "event",
"default": true,
"layout": [
{
"type": "textarea",
"left": "13.09",
"bottom": "49.73",
"fontsize": "23.6",
"color": [0, 0, 0, 1],
"fontfamily": "Open Sans",
"bold": true,
"italic": false,
"width": "121.83",
"height": "100.0" // new field
"content": "attendee_name",
"text": "Max Mustermann",
"align": "center",
"orientation": "portrait", // new field
}
],
"background": null,
"item_assignments": []
}
]
}