de.sonallux.spotify.api.apis.users.CheckIfUserFollowsPlaylistRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotify-web-api-java Show documentation
Show all versions of spotify-web-api-java Show documentation
A Java wrapper for Spotify's Web API
The newest version!
package de.sonallux.spotify.api.apis.users;
import com.fasterxml.jackson.core.type.TypeReference;
import de.sonallux.spotify.api.http.ApiCall;
import de.sonallux.spotify.api.http.ApiClient;
import de.sonallux.spotify.api.http.Request;
import de.sonallux.spotify.api.models.*;
/**
* Check if Current User Follows Playlist request
*
* Response
* Array of boolean, containing a single boolean
*/
public class CheckIfUserFollowsPlaylistRequest {
private static final TypeReference> RESPONSE_TYPE = new TypeReference<>() {};
private final ApiClient apiClient;
private final Request request;
/**
* Check if Current User Follows Playlist request
* @param apiClient The API client
* @param playlistId The Spotify ID of the playlist.
*/
public CheckIfUserFollowsPlaylistRequest(ApiClient apiClient, String playlistId) {
this.apiClient = apiClient;
this.request = new Request("GET", "/playlists/{playlist_id}/followers/contains")
.addPathParameter("playlist_id", String.valueOf(playlistId))
;
}
/**
* @param ids Deprecated A single item list containing current user's Spotify Username. Maximum: 1 id.
* @return this request
*/
public CheckIfUserFollowsPlaylistRequest ids(String ids) {
this.request.addQueryParameter("ids", String.valueOf(ids));
return this;
}
/**
* Build the request into an executable api call
* @return an executable api call
*/
public ApiCall> build() {
return apiClient.createApiCall(request, RESPONSE_TYPE);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy