-
Notifications
You must be signed in to change notification settings - Fork 1
Methods (v1)
Ryan edited this page Oct 30, 2021
·
11 revisions
Get stats from Bunker's or any Azura Cast API URL specified in config.json.
http://localhost:5050/api/treble/stats
{
"success": true, weather the response has an error
"song": {
"title": "Power", song title
"artist": "Brad Wood (UK)", artist title
"album": "Brad Wood (UK)" album title
},
"on_air": {
"live": "AutoDJ" current live DJ, shows "AutoDJ" when no one is live
},
"listeners": {
"total": 0, total listeners
"current": 0, current listeners
"unique": 0 unique IP listeners
},
"important": { must be included for any request
"notice": "This API is for bunker.dance, if you'd like to use this for your own station, please include this notice and the source.",
"source": "https://github.com/bunkerradio/api"
}
}Lookup song data using the Deezer & Spotify API. An alternative to xonos.tools
track: track name
artist: artist name
isrc: ISRC code (optional)
http://localhost:5050/api/treble/lookup?track=Gods%20Plan&artist=Drake
{
"success": true, if there is an error or not
"accuracy": 90, accuracy of the result search, in percentage
"result": {
"title": "God's Plan", title of track
"artist": {
"names": "Drake", a list of names of the artists
"spotify_id": "3TVXtAsR1Inumwj472S9r4", spotify ID of the main artist
"deezer_id": 246791, deezer ID of the main artist
"picture": { an array of pictures for the main artist
"xl": "https://e-cdns-images.dzcdn.net/images/artist/5d2fa7f140a6bdc2c864c3465a61fc71/1000x1000-000000-80-0-0.jpg",
"large": "https://e-cdns-images.dzcdn.net/images/artist/5d2fa7f140a6bdc2c864c3465a61fc71/500x500-000000-80-0-0.jpg",
"medium": "https://e-cdns-images.dzcdn.net/images/artist/5d2fa7f140a6bdc2c864c3465a61fc71/250x250-000000-80-0-0.jpg",
"small": "https://e-cdns-images.dzcdn.net/images/artist/5d2fa7f140a6bdc2c864c3465a61fc71/56x56-000000-80-0-0.jpg"
}
},
"album": {
"title": "Scorpion", title of album
"spotify_id": "1ATL5GLyefJaxhQzSPVrLX", spotify ID of the album
"deezer_id": 69319552 deezer ID of the album
},
"color": [ RGB value of dominant color in the track cover
51,
51,
51
],
"covers": { an array of pictures for the track
"xl": "https://e-cdns-images.dzcdn.net/images/cover/b69d3bcbd130ad4cc9259de543889e30/1000x1000-000000-80-0-0.jpg",
"large": "https://e-cdns-images.dzcdn.net/images/cover/b69d3bcbd130ad4cc9259de543889e30/500x500-000000-80-0-0.jpg",
"medium": "https://e-cdns-images.dzcdn.net/images/cover/b69d3bcbd130ad4cc9259de543889e30/250x250-000000-80-0-0.jpg",
"small": "https://e-cdns-images.dzcdn.net/images/cover/b69d3bcbd130ad4cc9259de543889e30/56x56-000000-80-0-0.jpg"
},
"spotify_id": "6DCZcSspjsKoFjzjrWoCdn", spotify ID of the track
"deezer_id": 533609232, deezer ID of the track
"isrc": "USCM51800004", ISRC of the track
"duration": 198973, duration in milliseconds
"popularity": 83, popularity of the track on Spotify, in percentage
"preview": "https://cdns-preview-9.dzcdn.net/stream/c-9990cd5b96f85daf3f3dc57ed801a899-6.mp3", thirty second preview of the track
"release_date": 1530230400, release date in unix time
"problems": [ array of problems with the song. Possible errors: "explicit_lyrics", "explicit_cover"
{
"code": "explicit_lyrics",
"description": "This track has explicit lyrics."
},
{
"code": "explicit_cover",
"description": "This track has an explicit cover."
}
],
"powered_by": { copyright notice, this has to be included if forked / cloned
"website": "https://bunker.dance",
"copyright": "Copyright 2021-Present Bunker | Source: https://github.com/bunkerradio/api"
},
"version": "1.0.0", api version
"cache": 1635592402422 when this track was cached
}
}