Note that this is based on an earlier state of the project, and the terms used in this schema may differ from the current state of the project.
54 lines
1.9 KiB
JSON
54 lines
1.9 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"PlaybackPosition": {
|
|
"type": "object",
|
|
"properties": {
|
|
"position_seconds": { "type": "number" },
|
|
"device_uptime": { "type": "number" }
|
|
},
|
|
"required": ["position_seconds"]
|
|
},
|
|
"AudioFile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string", "format": "uuid" },
|
|
"filename": { "type": "string" },
|
|
"size_bytes": { "type": "integer" },
|
|
"duration_seconds": { "type": "number" },
|
|
"last_played_uptime": { "type": "number" },
|
|
"playback_position": { "$ref": "#/definitions/PlaybackPosition" }
|
|
},
|
|
"required": ["id", "filename"]
|
|
},
|
|
"Playlist": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string", "format": "uuid" },
|
|
"name": { "type": "string" },
|
|
"audio_files": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/AudioFile" }
|
|
},
|
|
"current_track_index": { "type": "integer", "minimum": 0 },
|
|
"last_played_uptime": { "type": "number" },
|
|
"playback_position": { "$ref": "#/definitions/PlaybackPosition" }
|
|
},
|
|
"required": ["id", "name", "audio_files"]
|
|
},
|
|
"NfcTag": {
|
|
"type": "object",
|
|
"properties": {
|
|
"uid": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"linked_type": {
|
|
"type": "string",
|
|
"enum": ["audio_file", "playlist"]
|
|
},
|
|
"linked_id": { "type": "string", "format": "uuid" }
|
|
},
|
|
"required": ["uid", "linked_type", "linked_id"]
|
|
}
|
|
}
|
|
}
|