Class GetPlaylistRequest
- java.lang.Object
-
- de.sonallux.spotify.api.apis.playlists.GetPlaylistRequest
-
public class GetPlaylistRequest extends Object
Get a Playlist requestResponse
On success, the response body contains a playlist object in JSON format and the HTTP status code in the response header is
200OK. If an episode is unavailable in the givenmarket, 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 error403Forbidden.
-
-
Constructor Summary
Constructors Constructor Description GetPlaylistRequest(ApiClient apiClient, String playlistId)Get a Playlist request
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetPlaylistRequestadditionalTypes(String additionalTypes)A comma-separated list of item types that your client supports besides the defaulttracktype.ApiCall<Playlist>build()Build the request into an executable callGetPlaylistRequestfields(String fields)Filters for the query: a comma-separated list of the fields to return.GetPlaylistRequestmarket(String market)An ISO 3166-1 alpha-2 country code or the stringfrom_token.
-
-
-
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
tracktype. Valid types are:trackandepisode. 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 thetypefield of each object.
-
-