docs: basic /track endpoint #2

Merged
sebafudi merged 1 commits from api-documentation into master 2021-09-08 19:11:09 +02:00
+78
View File
@@ -0,0 +1,78 @@
swagger: '2.0'
info:
title: Radio Rolnik API
version: 1.0.0
description: API for radio-rolnik project
host: radio-rolnik.mtps.pl
basePath: /v1
tags:
- name: track
description: Everything about tracks
schemes:
- https
paths:
/track:
get:
tags:
- track
summary: Returns current track metadata
responses:
200:
description: OK
produces:
- application/json
/track/{id}:
get:
tags:
- track
summary: Find track by id
operationId: getTrackById
parameters:
- name: id
in: path
description: ID of track to return
required: true
type: integer
responses:
200:
description: OK
schema:
$ref: '#/definitions/track'
produces:
- application/json
definitions:
track:
type: object
properties:
id:
type: string
title:
type: string
artists:
type: array
items:
type: string
album:
type: object
properties:
name:
type: string
art:
type: string
year:
type: number
duration:
type: number
explicit:
type: boolean
banned:
type: boolean
votes:
type: object
properties:
up:
type: number
down:
type: number
rank:
type: number