Link Search Menu Expand Document

queue.getSuggestedPlaylists

Returns suggested playlists for the queue

Example URL

https://api.melodia.io/v1/queue.getSuggestedTracks?userKey=a4b5G982H3r9Vf783EEd&playingTrack_key=MT1543F19k&queueTrack_keys=MT234jk23f,MTgedsfgk1bV,MT154jF291&timestamp=1625294543&activity=running&location_latitude=37.445099&location_longitude=-122.160362&location_altitude=9.1

Params

paramrequireddescriptiontype
userKeyYA unique ID to be associated with the new userString
playingTrack_keyYTrack key associated with playing trackString
queueTrack_keysNTrack keys associated with upcoming tracks in the queue (selected by the user). Track keys must be separated with a comma if more than one key is provided, and ordered according to how they appear in the queue.String
seedKeyNSeed (track, artist, or genre) key if station is seed-based radio. If no value provided, station is treated as smart stationString
timestampNCurrent moment’s Unix timestamp (in seconds). Defaults to current timestamp.Int
activityNCurrent moment’s activity. Can be either of the following: stationary, walking, running, biking, drivingString
location_latitudeNCurrent moment’s location’s latitude (in degrees)Float
location_longitudeNCurrent moment’s location’s longitude (in degrees)Float
location_altitudeNCurrent moment’s location’s altitude (in meters)Float

Auth

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

Sample Response

{
    "statusCode": 200,
    "body":
        "playlists": [
            {"theme": "more by Adele",
             "tracks": [
                "trackKey": "MT239432948",
                "title": "Someone Like You",
                "artist": "Adele",
                "artistKey": "MA29FE4f3gXj",
                "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
                ...
                ]
            },
            {"theme": "Singer-Songwriter",
             "tracks": [
                "trackKey": "MT2894F294R",
                "title": "Thinking Out Loud",
                "artist": "Ed Sheeran",
                "artistKey": "MA69FE2f3g34",
                "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
                ...
                ]
            },
    ]
}

Discussion

Call this method to get playlist suggestions to be added to the queue by the user. Suggested playlists can be one of the following types:

  • artist: more songs by playing track’s artist
  • dynamic: dynamically generated playlist by Melodia with a common genre theme
  • custom: custom playlist created by the user