---
swagger: "2.0"
info:
  description: MyRadio24 API
  version: 2.0.0
  title: MyRadio24 API
  contact:
    email: noreply@example.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
host: myradio24.com
basePath: /myradio24/2.0.0
tags:
- name: developers
  description: Operations available to regular developers
schemes:
- https
paths:
  /users/${userName}/status.json:
    get:
      tags:
      - developers
      summary: station info
      description: You can get information about the station
      operationId: stationInfo
      produces:
      - application/json
      parameters:
      - name: userName
        in: path
        description: pass a search string for looking up inventory
        required: true
        type: string
      responses:
        "200":
          description: station info
          schema:
            $ref: '#/definitions/station'
        "404":
          description: bad input parameter
definitions:
  station:
    type: object
    properties:
      port:
        type: string
        example: demo
        description: Station identifier (username)
      online:
        type: integer
        description: 0 - offile; 1 - online
      kbps:
        type: integer
        example: 128
        description: Station bitrate
      limit:
        type: integer
        example: 1000
        description: Max allowed listeners
      title:
        type: string
        example: DEMO
        description: Station title
      djname:
        type: string
        example: Auto-DJ
        description: DJ Name
      song:
        type: string
        example: The Kyoto Connection - Hachiko (The Faithtful Dog)
      genre:
        type: string
        example: other
        description: Station genre
      url:
        type: string
        example: https://myradio24.org/demo
        description: Station URL
      streamname:
        type: string
        example: Auto-DJ
      files:
        type: integer
        example: 123
        description: Number of files available
      listeners:
        type: integer
        example: 2
        description: Current online listeners
      nolisteners:
        type: integer
        example: 3
        description: Current online listeners (if hidden)
      plisteners:
        type: integer
        example: 4
        description: Peak listeners count
      country:
        type: string
        example: russia
        description: Station country
      favorites:
        type: integer
        example: 9
        description: Number of people who added the station to favourites
      artist:
        type: string
        example: The Kyoto Connection
      songtitle:
        type: string
        example: Hachiko (The Faithtful Dog)
      img:
        type: string
        example: artists/1014c250f5f80f98ba2fa342c38d0d7f.jpg
        description: Path to the cover image relatively to https://myradio24.com/ (300x300px, medium quality)
      logo:
        type: string
        description: Path to the logo image relatively to https://myradio24.com/ (300x70px, medium quality)
      enabletable:
        type: integer
        example: 3
      turntable:
        type: integer
        example: 0
      nextsongs:
        type: array
        items:
          $ref: '#/definitions/song'
      playlist:
        type: string
      streams:
        type: array
        items:
          $ref: '#/definitions/stream'
      rank:
        type: array
        items:
          $ref: '#/definitions/rank'
      songs:
        type: array
        items:
          $ref: '#/definitions/song'
  stream:
    type: object
    properties:
      mount:
        type: string
        example: demo
      user:
        type: string
        example: demo
      kbps:
        type: integer
        example: 128
      format:
        type: string
        example: mp3
      "false":
        type: integer
        example: 0
      url:
        type: string
        example: https://myradio24.org/demo
  song:
    type: object
    properties:
      time:
        type: string
        example: 12:05:30
        description: Song start time in HH:MM:SS format
      song:
        type: string
        example: Ketsa - Wounds
        description: Full song title with artist
      img:
        type: string
        example: artists/204056ebabc387c9f6e234026ec75854.jpg
        description: Path to the cover image relatively to https://myradio24.com/  (300x300px, medium quality)
      songid:
        type: string
        example: "188046582412354572"
        description: Unique song ID as string (max value bigint unsigned 20 digits)
      artist:
        type: string
        example: Ketsa
        description: Artist name
      songtitle:
        type: string
        example: Wounds
        description: Song title
  rank:
    type: object
    properties:
      djname:
        type: string
        example: admin
        description: DJ name
      rating:
        type: integer
        example: 3
        description: DJ rating
      hours:
        type: integer
        example: 15
        description: Number of broadcast hours
      count:
        type: integer
        example: 5
        description: Number of times broadcast
      avatar:
        type: string
        example: img/noavatar.jpg
        description: Path to the avatar image relatively to https://myradio24.com/  (300x300px, medium quality)
