DovaFM Documentation
WebsiteAdd Discord Bot
  • Welcome to the DovaFM Documentation!
  • DovaFM Stream
    • Embed Widgets
    • Public Pages
    • Radio & Playlist Streams
  • DovaFM API
    • Now Playing
    • Stations
      • General
      • Broadcasting
      • Song Requests
      • Service Control
      • History
      • HLS Streams
      • Listeners
      • Schedules
      • Media
      • Mount Points
      • Playlists
      • Podcasts
      • Queue
      • Remote Relays
      • SFTP Users
      • Streamers/DJs
      • Web Hooks
    • Administration
      • Custom Fields
      • Users
      • Relays
      • Roles
      • Settings
      • Stations
      • Storage Locations
      • CPU Status
    • Miscellaneous
      • Status
      • Time
  • DovaFM Discord Bot
    • Information
    • Commands
  • DovaFM Staff
    • Staff Members
Powered by GitBook
On this page
  1. DovaFM API

Now Playing

PreviousRadio & Playlist StreamsNextStations

Last updated 7 months ago

get

Returns a full summary of all stations' current state.

Responses
200
Success
application/json
get
GET /api/nowplaying HTTP/1.1
Host: listen.dovafm.xyz
Accept: */*
200

Success

[
  {
    "station": {
      "id": 1,
      "name": "AzuraTest Radio",
      "shortcode": "azuratest_radio",
      "description": "An AzuraCast station!",
      "frontend": "shoutcast2",
      "backend": "liquidsoap",
      "timezone": "America/Chicago",
      "listen_url": "http://localhost:8000/radio.mp3",
      "url": "https://example.com/",
      "public_player_url": "https://example.com/public/example_station",
      "playlist_pls_url": "https://example.com/public/example_station/playlist.pls",
      "playlist_m3u_url": "https://example.com/public/example_station/playlist.m3u",
      "is_public": true,
      "mounts": [
        {
          "id": 1,
          "name": "/radio.mp3",
          "url": "http://localhost:8000/radio.mp3",
          "bitrate": 128,
          "format": "mp3",
          "listeners": {
            "total": 20,
            "unique": 15,
            "current": 20
          },
          "path": "/radio.mp3",
          "is_default": true
        }
      ],
      "remotes": [
        {
          "id": 1,
          "name": "/radio.mp3",
          "url": "http://localhost:8000/radio.mp3",
          "bitrate": 128,
          "format": "mp3",
          "listeners": {
            "total": 20,
            "unique": 15,
            "current": 20
          }
        }
      ],
      "hls_enabled": true,
      "hls_is_default": true,
      "hls_url": "https://example.com/hls/azuratest_radio/live.m3u8",
      "hls_listeners": 1
    },
    "listeners": {
      "total": 20,
      "unique": 15,
      "current": 20
    },
    "live": {
      "is_live": false,
      "streamer_name": "DJ Jazzy Jeff",
      "broadcast_start": "1591548318",
      "art": "https://picsum.photos/1200/1200"
    },
    "now_playing": {
      "sh_id": 1,
      "played_at": 1609480800,
      "duration": 180,
      "playlist": "Top 100",
      "streamer": "Test DJ",
      "is_request": true,
      "song": {
        "text": "Chet Porter - Aluko River",
        "artist": "Chet Porter",
        "title": "Aluko River",
        "album": "Moving Castle",
        "genre": "Rock",
        "isrc": "US28E1600021",
        "lyrics": "",
        "id": "9f33bbc912c19603e51be8e0987d076b",
        "art": "https://picsum.photos/1200/1200",
        "custom_fields": [
          "custom_field_value"
        ]
      },
      "elapsed": 25,
      "remaining": 155
    },
    "playing_next": {
      "cued_at": 1609480800,
      "played_at": 1609480800,
      "duration": 180,
      "playlist": "Top 100",
      "is_request": true,
      "song": {
        "text": "Chet Porter - Aluko River",
        "artist": "Chet Porter",
        "title": "Aluko River",
        "album": "Moving Castle",
        "genre": "Rock",
        "isrc": "US28E1600021",
        "lyrics": "",
        "id": "9f33bbc912c19603e51be8e0987d076b",
        "art": "https://picsum.photos/1200/1200",
        "custom_fields": [
          "custom_field_value"
        ]
      }
    },
    "song_history": [
      {
        "sh_id": 1,
        "played_at": 1609480800,
        "duration": 180,
        "playlist": "Top 100",
        "streamer": "Test DJ",
        "is_request": true,
        "song": {
          "text": "Chet Porter - Aluko River",
          "artist": "Chet Porter",
          "title": "Aluko River",
          "album": "Moving Castle",
          "genre": "Rock",
          "isrc": "US28E1600021",
          "lyrics": "",
          "id": "9f33bbc912c19603e51be8e0987d076b",
          "art": "https://picsum.photos/1200/1200",
          "custom_fields": [
            "custom_field_value"
          ]
        }
      }
    ],
    "is_online": true,
    "cache": "hit"
  }
]
get

Returns a full summary of the specified station's current state.

Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
Responses
200
Success
application/json
404
Record not found.
application/json
get
GET /api/nowplaying/{station_id} HTTP/1.1
Host: listen.dovafm.xyz
Accept: */*
{
  "station": {
    "id": 1,
    "name": "AzuraTest Radio",
    "shortcode": "azuratest_radio",
    "description": "An AzuraCast station!",
    "frontend": "shoutcast2",
    "backend": "liquidsoap",
    "timezone": "America/Chicago",
    "listen_url": "http://localhost:8000/radio.mp3",
    "url": "https://example.com/",
    "public_player_url": "https://example.com/public/example_station",
    "playlist_pls_url": "https://example.com/public/example_station/playlist.pls",
    "playlist_m3u_url": "https://example.com/public/example_station/playlist.m3u",
    "is_public": true,
    "mounts": [
      {
        "id": 1,
        "name": "/radio.mp3",
        "url": "http://localhost:8000/radio.mp3",
        "bitrate": 128,
        "format": "mp3",
        "listeners": {
          "total": 20,
          "unique": 15,
          "current": 20
        },
        "path": "/radio.mp3",
        "is_default": true
      }
    ],
    "remotes": [
      {
        "id": 1,
        "name": "/radio.mp3",
        "url": "http://localhost:8000/radio.mp3",
        "bitrate": 128,
        "format": "mp3",
        "listeners": {
          "total": 20,
          "unique": 15,
          "current": 20
        }
      }
    ],
    "hls_enabled": true,
    "hls_is_default": true,
    "hls_url": "https://example.com/hls/azuratest_radio/live.m3u8",
    "hls_listeners": 1
  },
  "listeners": {
    "total": 20,
    "unique": 15,
    "current": 20
  },
  "live": {
    "is_live": false,
    "streamer_name": "DJ Jazzy Jeff",
    "broadcast_start": "1591548318",
    "art": "https://picsum.photos/1200/1200"
  },
  "now_playing": {
    "sh_id": 1,
    "played_at": 1609480800,
    "duration": 180,
    "playlist": "Top 100",
    "streamer": "Test DJ",
    "is_request": true,
    "song": {
      "text": "Chet Porter - Aluko River",
      "artist": "Chet Porter",
      "title": "Aluko River",
      "album": "Moving Castle",
      "genre": "Rock",
      "isrc": "US28E1600021",
      "lyrics": "",
      "id": "9f33bbc912c19603e51be8e0987d076b",
      "art": "https://picsum.photos/1200/1200",
      "custom_fields": [
        "custom_field_value"
      ]
    },
    "elapsed": 25,
    "remaining": 155
  },
  "playing_next": {
    "cued_at": 1609480800,
    "played_at": 1609480800,
    "duration": 180,
    "playlist": "Top 100",
    "is_request": true,
    "song": {
      "text": "Chet Porter - Aluko River",
      "artist": "Chet Porter",
      "title": "Aluko River",
      "album": "Moving Castle",
      "genre": "Rock",
      "isrc": "US28E1600021",
      "lyrics": "",
      "id": "9f33bbc912c19603e51be8e0987d076b",
      "art": "https://picsum.photos/1200/1200",
      "custom_fields": [
        "custom_field_value"
      ]
    }
  },
  "song_history": [
    {
      "sh_id": 1,
      "played_at": 1609480800,
      "duration": 180,
      "playlist": "Top 100",
      "streamer": "Test DJ",
      "is_request": true,
      "song": {
        "text": "Chet Porter - Aluko River",
        "artist": "Chet Porter",
        "title": "Aluko River",
        "album": "Moving Castle",
        "genre": "Rock",
        "isrc": "US28E1600021",
        "lyrics": "",
        "id": "9f33bbc912c19603e51be8e0987d076b",
        "art": "https://picsum.photos/1200/1200",
        "custom_fields": [
          "custom_field_value"
        ]
      }
    }
  ],
  "is_online": true,
  "cache": "hit"
}
  • GET/nowplaying
  • GET/nowplaying/{station_id}