View on GitHub

ickstream-docs

Public documentation about the ickStream Music Platform

Retrieve tracks for a dynamic playlist using a specified set of parameters

The purpose is to be able to easily

It’s not mandatory for all content services to support all of these playlist types. So even if the controller specifies a long list of services the player might only be able to get tracks from a few of them because the rest might not support the selection parameter type specified.

Request:

{
    "jsonrpc": 2.0,
    "id": < A unique number used to correlate requests with responses, see JSON-RPC specification for more information >,
    "method": "getNextDynamicPlaylistTracks",
    "params": {
        "count": < number of tracks to retrieve >,
        "previousItems" [ Optional, the complete structure for the previous items played
            {
               ...
            },
            ...
        ],
        "selectionParameters": { <selection parmeters to use when finding tracks >
            "type": <Type of selection>,
            "data": <JSON data that defines the selection logic>
        }
    }
}

Specific information:

The type parameter in the selectionParameters parameter can have the following values

{
    "artist": <The textual name of the artist to restrict retrieved tracks to>
    "artistId": <Optional, the identity fo the artist. Please note that this is service specific,
                      so it can only be used if a single service is specified in the services attribute or if the selectionParameters are specified per service >
}
{
    "playlist": <The textual name of the playlist to restrict retrieved tracks to>
    "playlistId": <Optional, the identity fo the playlist. Please note that this is service specific,
                         so it can only be used if a single service is specified in the services attribute or if the selectionParameters are specified per service >
}
{
    "category": <The textual name of the category to restrict retrieved tracks to>
    "categoryId": <Optional, the identity fo the category. Please note that this is service specific,
                           so it can only be used if a single service is specified in the services attribute or if the selectionParameters are specified per service >
}

Except for the above mentioned type parameter values, a content service can also provide its own type values. These should always be prefixed with the service identity to indicate that they are service specific, for example “myservice.supersmartplaylisttype”.

Response:

{
    "jsonrpc": 2.0,
    "id": < The request identity >,
    "result": {
        "countAll": <Optional, total number of items available within the specified "context">,
        "lastChanged": <Optional, UTC time in seconds that indicates when this data
                                        was last changed, this can be used to detect if local cache needs to be refreshed. If this attribute is not
                                        specified the data should not be cached>
        "items": [
            {
                "id": < Unique identity for this item within the ickStream concept >,
                "text": < Textual representation of this item >,
                "sortText": < Optional, if specified it represents the appropriate sorting order >,
                "type": < Type of item, set to "track" or "stream" >,
                "streamingRefs": [ < Optional, streaming references for this item,
                                                     can be a single track or a continuous stream >
                    {
                        "format": < format of stream, for example "mp3" >,
                        "intermediate": <Optional, true if pointed to a redirected stream >,
                        "sampleRate": <Optional, sample rate, for example 44100 >,
                        "sampleSize": <Optional, sample size, for example 16 >,
                        "channels": <Optional, number of channels, for example 2 >,
                        "streamFormatInformation": <Optional, additional format information about the
                                                    stream, for example aac container type >
                        "url": < Url of this streaming reference >
                    },
                    ...
                ],
                "image": < Optional, URL to an image which represent this item >,
                "itemAttributes": {
                    < Model attribute identity >: <Model attribute value>
                    ...
                }
            },
            ...
        ]
    }
}

Category:Content Access Protocol