Class GetPlaylistRequest


  • public class GetPlaylistRequest
    extends Object
    Get a Playlist request

    Response

    On success, the response body contains a playlist object in JSON format and the HTTP status code in the response header is 200 OK. If an episode is unavailable in the given market, its information will not be included in the response. On error, the header status code is an error code and the response body contains an error object. Requesting playlists that you do not have the user's authorization to access returns error 403 Forbidden.

    • Constructor Detail

      • GetPlaylistRequest

        public GetPlaylistRequest​(ApiClient apiClient,
                                  String playlistId)

        Get a Playlist request

        Parameters:
        apiClient -

        The API client

        playlistId -

        The Spotify ID for the playlist.

    • Method Detail

      • market

        public GetPlaylistRequest market​(String market)

        An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking. For episodes, if a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
        Note: If neither market or user country are provided, the episode is considered unavailable for the client.

      • fields

        public GetPlaylistRequest fields​(String fields)

        Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned. For example, to get just the playlist''s description and URI: fields=description,uri. A dot separator can be used to specify non-reoccurring fields, while parentheses can be used to specify reoccurring fields within objects. For example, to get just the added date and user ID of the adder: fields=tracks.items(added_at,added_by.id). Use multiple parentheses to drill down into nested objects, for example: fields=tracks.items(track(name,href,album(name,href))). Fields can be excluded by prefixing them with an exclamation mark, for example: fields=tracks.items(track(name,href,album(!name,href)))

      • additionalTypes

        public GetPlaylistRequest additionalTypes​(String additionalTypes)

        A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode. Note : This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the type field of each object.

      • build

        public ApiCall<Playlist> build()
        Build the request into an executable call