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

de.sonallux.spotify.api.apis.users.CheckCurrentUserFollowsRequest 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.*;

/**
 * 

Check If User Follows Artists or Users request

* *

Required OAuth scopes

* user-follow-read * *

Response

*

Array of booleans

*/ public class CheckCurrentUserFollowsRequest { private static final TypeReference> RESPONSE_TYPE = new TypeReference<>() {}; private final ApiClient apiClient; private final Request request; /** * Check If User Follows Artists or Users request * @param apiClient

The API client

* @param type

The ID type: either artist or user.

* @param ids

A comma-separated list of the artist or the user Spotify IDs to check. For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. A maximum of 50 IDs can be sent in one request.

*/ public CheckCurrentUserFollowsRequest(ApiClient apiClient, String type, String ids) { this.apiClient = apiClient; this.request = new Request("GET", "/me/following/contains") .addQueryParameter("type", String.valueOf(type)) .addQueryParameter("ids", String.valueOf(ids)) ; } /** * 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