All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.sonallux.spotify.api.apis.playlists.GetFeaturedPlaylistsRequest Maven / Gradle / Ivy

The newest version!
package de.sonallux.spotify.api.apis.playlists;

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.*;

/**
 * 

Get Featured Playlists request

* *

Response

*

A paged set of playlists

*/ public class GetFeaturedPlaylistsRequest { private static final TypeReference RESPONSE_TYPE = new TypeReference<>() {}; private final ApiClient apiClient; private final Request request; /** * Get Featured Playlists request * @param apiClient

The API client

*/ public GetFeaturedPlaylistsRequest(ApiClient apiClient) { this.apiClient = apiClient; this.request = new Request("GET", "/browse/featured-playlists") ; } /** * @param locale

The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category strings returned in a particular language.
Note: if locale is not supplied, or if the specified language is not available, the category strings returned will be in the Spotify default language (American English).

* @return this request */ public GetFeaturedPlaylistsRequest locale(String locale) { this.request.addQueryParameter("locale", String.valueOf(locale)); return this; } /** * @param limit

The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

* @return this request */ public GetFeaturedPlaylistsRequest limit(int limit) { this.request.addQueryParameter("limit", String.valueOf(limit)); return this; } /** * @param offset

The index of the first item to return. Default: 0 (the first item). Use with limit to get the next set of items.

* @return this request */ public GetFeaturedPlaylistsRequest offset(int offset) { this.request.addQueryParameter("offset", String.valueOf(offset)); 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