Link Search Menu Expand Document

station.getRadioTracks

Returns buffer tracks for a seed-based radio station, ordered by dynamic matching. Also submits last played track datapoint if provided.

Example URL

https://api.melodia.io/v1/station.getRadioTracks?userKey=a4b5G982H3r9Vf783EEd&dpTrack_key=MT234jk23f&dpTrack_listenFraction=1.0&timestamp=1625294543&activity=running&location_latitude=37.445099&location_longitude=-122.160362&location_altitude=9.1&count=5

Params

paramrequireddescriptiontype
userKeyYA unique ID to be associated with the new userString
seedKeyNSeed (track, artist, or genre) key if station is seed-based radio. If no value provided, station is treated as smart stationString
dpTrack_keyNTrack key of last played track.String
dpTrack_listenFractionNFloating number between 0.0 and 1.0 indicating what fraction of the last played track was listened before being skipped (i.e., 0.0 if immediately skipped, 1.0 if listened till end). If not provided, defaults to 1.0 if dpTrack_key is providedFloat
timestampNCurrent moment’s Unix timestamp (in seconds)Int
countNNumber of tracks to return (defaults to 3)Int

Auth

This service requires authentication. Refer to Authentication for more details.

Sample Response

{
    "statusCode": 200,
    "body":
        "tracks": [
        {
            "trackKey": "MT239432948",
            "title": "Where the Streets have no name",
            "artist": "U2",
            "artistKey": "MA29FE4f3gXj",
            "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
            ...
        },
        {
            "trackKey": "MT23WMd2948",
            "title": "I'm On Fire",
            "artist": "Bruce Springsteed",
            "artistKey": "MA29FE3243gXj",
            "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
            ...
        }
    ]
}

Discussion

Call this method to buffer your smart station with the optimal tracks.

To learn more about Melodia’s smart station, please refer to Smart Station