de.sonallux.spotify.api.apis.AudiobooksApi Maven / Gradle / Ivy
Show all versions of spotify-web-api-java Show documentation
package de.sonallux.spotify.api.apis;
import de.sonallux.spotify.api.http.ApiClient;
import de.sonallux.spotify.api.apis.audiobooks.*;
import lombok.RequiredArgsConstructor;
/**
* Audiobooks
*/
@RequiredArgsConstructor
public class AudiobooksApi {
private final ApiClient apiClient;
/**
* Check User's Saved Audiobooks
* Check if one or more audiobooks are already saved in the current Spotify user's library.
* @param ids A comma-separated list of the Spotify IDs. For example: ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ
. Maximum: 50 IDs.
* @return a {@link CheckUsersSavedAudiobooksRequest} object to build and execute the request
*/
public CheckUsersSavedAudiobooksRequest checkUsersSavedAudiobooks(String ids) {
return new CheckUsersSavedAudiobooksRequest(apiClient, ids);
}
/**
* Get an Audiobook
* Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
* @param id The Spotify IDfor the audiobook.
* @return a {@link GetAudiobookRequest} object to build and execute the request
*/
public GetAudiobookRequest getAudiobook(String id) {
return new GetAudiobookRequest(apiClient, id);
}
/**
* Get Audiobook Chapters
* Get Spotify catalog information about an audiobook's chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
* @param id The Spotify IDfor the audiobook.
* @return a {@link GetAudiobookChaptersRequest} object to build and execute the request
*/
public GetAudiobookChaptersRequest getAudiobookChapters(String id) {
return new GetAudiobookChaptersRequest(apiClient, id);
}
/**
* Get Several Audiobooks
* Get Spotify catalog information for several audiobooks identified by their Spotify IDs. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
* @param ids A comma-separated list of the Spotify IDs. For example: ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ
. Maximum: 50 IDs.
* @return a {@link GetMultipleAudiobooksRequest} object to build and execute the request
*/
public GetMultipleAudiobooksRequest getMultipleAudiobooks(String ids) {
return new GetMultipleAudiobooksRequest(apiClient, ids);
}
/**
* Get User's Saved Audiobooks
* Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library.
* @return a {@link GetUsersSavedAudiobooksRequest} object to build and execute the request
*/
public GetUsersSavedAudiobooksRequest getUsersSavedAudiobooks() {
return new GetUsersSavedAudiobooksRequest(apiClient);
}
/**
* Remove User's Saved Audiobooks
* Remove one or more audiobooks from the Spotify user's library.
* @param ids A comma-separated list of the Spotify IDs. For example: ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ
. Maximum: 50 IDs.
* @return a {@link RemoveAudiobooksUserRequest} object to build and execute the request
*/
public RemoveAudiobooksUserRequest removeAudiobooksUser(String ids) {
return new RemoveAudiobooksUserRequest(apiClient, ids);
}
/**
* Save Audiobooks for Current User
* Save one or more audiobooks to the current Spotify user's library.
* @param ids A comma-separated list of the Spotify IDs. For example: ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ
. Maximum: 50 IDs.
* @return a {@link SaveAudiobooksUserRequest} object to build and execute the request
*/
public SaveAudiobooksUserRequest saveAudiobooksUser(String ids) {
return new SaveAudiobooksUserRequest(apiClient, ids);
}
}