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

de.sonallux.spotify.api.apis.users.GetFollowedRequest Maven / Gradle / Ivy

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

/**
 * 

Get Followed Artists request

* *

Required OAuth scopes

* user-follow-read * *

Response

*

A paged set of artists

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

The API client

* @param type

The ID type: currently only artist is supported.

*/ public GetFollowedRequest(ApiClient apiClient, String type) { this.apiClient = apiClient; this.request = new Request("GET", "/me/following") .addQueryParameter("type", String.valueOf(type)) ; } /** * @param after

The last artist ID retrieved from the previous request.

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

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

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