Class GetPlaylistsTracksRequest
- java.lang.Object
-
- de.sonallux.spotify.api.apis.playlists.GetPlaylistsTracksRequest
-
public class GetPlaylistsTracksRequest extends Object
Get a Playlist's Items requestResponse
On success, the response body contains an array of track objects and episode objects (depends on the
additional_typesparameter), wrapped in a paging object in JSON format and the HTTP status code in the response header is200OK. 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 GetPlaylistsTracksRequest(ApiClient apiClient, String playlistId)Get a Playlist's Items request
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetPlaylistsTracksRequestadditionalTypes(String additionalTypes)A comma-separated list of item types that your client supports besides the defaulttracktype.ApiCall<Paging<PlaylistTrack>>build()Build the request into an executable callGetPlaylistsTracksRequestfields(String fields)Filters for the query: a comma-separated list of the fields to return.GetPlaylistsTracksRequestlimit(int limit)The maximum number of items to return.GetPlaylistsTracksRequestmarket(String market)An ISO 3166-1 alpha-2 country code or the stringfrom_token.GetPlaylistsTracksRequestoffset(int offset)The index of the first item to return.
-
-
-
Constructor Detail
-
GetPlaylistsTracksRequest
public GetPlaylistsTracksRequest(ApiClient apiClient, String playlistId)
Get a Playlist's Items request
- Parameters:
apiClient-The API client
playlistId-The Spotify ID for the playlist.
-
-
Method Detail
-
market
public GetPlaylistsTracksRequest 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 GetPlaylistsTracksRequest 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 total number of items and the request limit:
fields=total,limit
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=items(added_at,added_by.id)
Use multiple parentheses to drill down into nested objects, for example:fields=items(track(name,href,album(name,href)))
Fields can be excluded by prefixing them with an exclamation mark, for example:fields=items.track.album(!external_urls,images)
-
limit
public GetPlaylistsTracksRequest limit(int limit)
The maximum number of items to return. Default: 100. Minimum: 1. Maximum: 100.
-
offset
public GetPlaylistsTracksRequest offset(int offset)
The index of the first item to return. Default: 0 (the first object).
-
additionalTypes
public GetPlaylistsTracksRequest 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.
-
build
public ApiCall<Paging<PlaylistTrack>> build()
Build the request into an executable call
-
-