Class GetUsersCurrentlyPlayingTrackRequest
- java.lang.Object
-
- de.sonallux.spotify.api.apis.player.GetUsersCurrentlyPlayingTrackRequest
-
public class GetUsersCurrentlyPlayingTrackRequest extends Object
Get the User's Currently Playing Track requestRequired OAuth scopes
user-read-currently-playing, user-read-playback-stateResponse
A successful request will return a
200 OKresponse code with a json payload that contains information about the currently playing track or episode and its context (see below). The information returned is for the last known state, which means an inactive device could be returned if it was the last one to execute playback.When no available devices are found, the request will return a
200 OKresponse but with no data populated.When no track is currently playing, the request will return a
204 NO CONTENTresponse with no payload.If private session is enabled the response will be a
204 NO CONTENTwith an empty payload.
-
-
Constructor Summary
Constructors Constructor Description GetUsersCurrentlyPlayingTrackRequest(ApiClient apiClient, String market)Get the User's Currently Playing Track request
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetUsersCurrentlyPlayingTrackRequestadditionalTypes(String additionalTypes)A comma-separated list of item types that your client supports besides the defaulttracktype.ApiCall<CurrentlyPlaying>build()Build the request into an executable call
-
-
-
Constructor Detail
-
GetUsersCurrentlyPlayingTrackRequest
public GetUsersCurrentlyPlayingTrackRequest(ApiClient apiClient, String market)
Get the User's Currently Playing Track request
- Parameters:
apiClient-The API client
market-An ISO 3166-1 alpha-2 country code or the string
from_token. Provide this parameter if you want to apply Track Relinking.
-
-
Method Detail
-
additionalTypes
public GetUsersCurrentlyPlayingTrackRequest additionalTypes(String additionalTypes)
A comma-separated list of item types that your client supports besides the default
tracktype. Valid types are:trackandepisode. An unsupported type in the response is expected to be represented asnullvalue in theitemfield. 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 thecurrently_playing_typefield.
-
build
public ApiCall<CurrentlyPlaying> build()
Build the request into an executable call
-
-