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

com.twitter.clientlib.api.ListsApi Maven / Gradle / Ivy

/*
Copyright 2020 Twitter, Inc.
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
https://openapi-generator.tech
Do not edit the class manually.
*/


package com.twitter.clientlib.api;

import com.twitter.clientlib.ApiCallback;
import com.twitter.clientlib.ApiClient;
import com.twitter.clientlib.auth.*;
import com.twitter.clientlib.ApiException;
import com.twitter.clientlib.ApiResponse;
import com.twitter.clientlib.Configuration;
import com.twitter.clientlib.Pair;
import com.twitter.clientlib.ProgressRequestBody;
import com.twitter.clientlib.ProgressResponseBody;

import com.github.scribejava.core.model.OAuth2AccessToken;
import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.twitter.clientlib.model.Error;
import com.twitter.clientlib.model.ListAddMemberRequest;
import com.twitter.clientlib.model.ListCreateRequest;
import com.twitter.clientlib.model.ListCreateResponse;
import com.twitter.clientlib.model.ListDeleteResponse;
import com.twitter.clientlib.model.ListFollowRequest;
import com.twitter.clientlib.model.ListFollowedResponse;
import com.twitter.clientlib.model.ListMemberResponse;
import com.twitter.clientlib.model.ListPinRequest;
import com.twitter.clientlib.model.ListPinnedResponse;
import com.twitter.clientlib.model.ListUpdateRequest;
import com.twitter.clientlib.model.ListUpdateResponse;
import com.twitter.clientlib.model.MultiListNoPaginationResponse;
import com.twitter.clientlib.model.MultiListResponse;
import com.twitter.clientlib.model.Problem;
import java.util.Set;
import com.twitter.clientlib.model.SingleListLookupResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Arrays;
import java.io.InputStream;
import javax.ws.rs.core.GenericType;

import org.apache.commons.lang3.StringUtils;

public class ListsApi extends ApiCommon {

    /**
     * Build call for getUserListMemberships
     * @param id The ID of the user for whom to return results (required)
     * @param maxResults The maximum number of results (optional, default to 100)
     * @param paginationToken This parameter is used to get a specified 'page' of results. (optional)
     * @param listFields A comma separated list of List fields to display. (optional)
     * @param expansions A comma separated list of fields to expand. (optional)
     * @param userFields A comma separated list of User fields to display. (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call getUserListMembershipsCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/list_memberships" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("max_results", maxResults)); } if (paginationToken != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination_token", paginationToken)); } if (listFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "list.fields", listFields)); } if (expansions != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "expansions", expansions)); } if (userFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "user.fields", userFields)); } final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken", "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserListMembershipsValidateBeforeCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getUserListMemberships(Async)"); } okhttp3.Call localVarCall = getUserListMembershipsCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); return localVarCall; } /** * Get a User's List Memberships * Get a User's List Memberships. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return MultiListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public MultiListResponse getUserListMemberships(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { ApiResponse localVarResp; try{ localVarResp = getUserListMembershipsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = getUserListMembershipsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Get a User's List Memberships * Get a User's List Memberships. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return ApiResponse<MultiListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse getUserListMembershipsWithHttpInfo(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { okhttp3.Call localVarCall = getUserListMembershipsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Get a User's List Memberships (asynchronously) * Get a User's List Memberships. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call getUserListMembershipsAsync(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserListMembershipsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listAddMember * @param listAddMemberRequest (optional) * @param id The ID of the List to add a member (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listAddMemberCall(ListAddMemberRequest listAddMemberRequest, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = listAddMemberRequest; // create path and map variables String localVarPath = "/2/lists/{id}/members" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listAddMemberValidateBeforeCall(ListAddMemberRequest listAddMemberRequest, String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listAddMember(Async)"); } okhttp3.Call localVarCall = listAddMemberCall(listAddMemberRequest, id, _callback); return localVarCall; } /** * Add a List member * Causes a user to become a member of a List. * @param listAddMemberRequest (optional) * @param id The ID of the List to add a member (required) * @return ListMemberResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListMemberResponse listAddMember(ListAddMemberRequest listAddMemberRequest, String id) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listAddMemberWithHttpInfo(listAddMemberRequest, id); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listAddMemberWithHttpInfo(listAddMemberRequest, id); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Add a List member * Causes a user to become a member of a List. * @param listAddMemberRequest (optional) * @param id The ID of the List to add a member (required) * @return ApiResponse<ListMemberResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listAddMemberWithHttpInfo(ListAddMemberRequest listAddMemberRequest, String id) throws ApiException { okhttp3.Call localVarCall = listAddMemberValidateBeforeCall(listAddMemberRequest, id, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Add a List member (asynchronously) * Causes a user to become a member of a List. * @param listAddMemberRequest (optional) * @param id The ID of the List to add a member (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listAddMemberAsync(ListAddMemberRequest listAddMemberRequest, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listAddMemberValidateBeforeCall(listAddMemberRequest, id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listIdCreate * @param listCreateRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdCreateCall(ListCreateRequest listCreateRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = listCreateRequest; // create path and map variables String localVarPath = "/2/lists"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listIdCreateValidateBeforeCall(ListCreateRequest listCreateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIdCreateCall(listCreateRequest, _callback); return localVarCall; } /** * Create List * Creates a new List. * @param listCreateRequest (optional) * @return ListCreateResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListCreateResponse listIdCreate(ListCreateRequest listCreateRequest) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listIdCreateWithHttpInfo(listCreateRequest); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listIdCreateWithHttpInfo(listCreateRequest); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Create List * Creates a new List. * @param listCreateRequest (optional) * @return ApiResponse<ListCreateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listIdCreateWithHttpInfo(ListCreateRequest listCreateRequest) throws ApiException { okhttp3.Call localVarCall = listIdCreateValidateBeforeCall(listCreateRequest, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Create List (asynchronously) * Creates a new List. * @param listCreateRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdCreateAsync(ListCreateRequest listCreateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIdCreateValidateBeforeCall(listCreateRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listIdDelete * @param id The ID of the List to delete (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdDeleteCall(String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/lists/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listIdDeleteValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listIdDelete(Async)"); } okhttp3.Call localVarCall = listIdDeleteCall(id, _callback); return localVarCall; } /** * Delete List * Delete a List that you own. * @param id The ID of the List to delete (required) * @return ListDeleteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListDeleteResponse listIdDelete(String id) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listIdDeleteWithHttpInfo(id); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listIdDeleteWithHttpInfo(id); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Delete List * Delete a List that you own. * @param id The ID of the List to delete (required) * @return ApiResponse<ListDeleteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listIdDeleteWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = listIdDeleteValidateBeforeCall(id, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Delete List (asynchronously) * Delete a List that you own. * @param id The ID of the List to delete (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdDeleteAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIdDeleteValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listIdGet * @param id The ID of the List to get (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdGetCall(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/lists/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (listFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "list.fields", listFields)); } if (expansions != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "expansions", expansions)); } if (userFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "user.fields", userFields)); } final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken", "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listIdGetValidateBeforeCall(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listIdGet(Async)"); } okhttp3.Call localVarCall = listIdGetCall(id, listFields, expansions, userFields, _callback); return localVarCall; } /** * List lookup by List ID * Returns a List * @param id The ID of the List to get (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return SingleListLookupResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public SingleListLookupResponse listIdGet(String id, Set listFields, Set expansions, Set userFields) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listIdGetWithHttpInfo(id, listFields, expansions, userFields); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listIdGetWithHttpInfo(id, listFields, expansions, userFields); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * List lookup by List ID * Returns a List * @param id The ID of the List to get (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return ApiResponse<SingleListLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listIdGetWithHttpInfo(String id, Set listFields, Set expansions, Set userFields) throws ApiException { okhttp3.Call localVarCall = listIdGetValidateBeforeCall(id, listFields, expansions, userFields, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * List lookup by List ID (asynchronously) * Returns a List * @param id The ID of the List to get (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdGetAsync(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIdGetValidateBeforeCall(id, listFields, expansions, userFields, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listIdUpdate * @param listUpdateRequest (optional) * @param id The ID of the List to modify (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdUpdateCall(ListUpdateRequest listUpdateRequest, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = listUpdateRequest; // create path and map variables String localVarPath = "/2/lists/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listIdUpdateValidateBeforeCall(ListUpdateRequest listUpdateRequest, String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listIdUpdate(Async)"); } okhttp3.Call localVarCall = listIdUpdateCall(listUpdateRequest, id, _callback); return localVarCall; } /** * Update List * Update a List that you own. * @param listUpdateRequest (optional) * @param id The ID of the List to modify (required) * @return ListUpdateResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListUpdateResponse listIdUpdate(ListUpdateRequest listUpdateRequest, String id) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listIdUpdateWithHttpInfo(listUpdateRequest, id); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listIdUpdateWithHttpInfo(listUpdateRequest, id); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Update List * Update a List that you own. * @param listUpdateRequest (optional) * @param id The ID of the List to modify (required) * @return ApiResponse<ListUpdateResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listIdUpdateWithHttpInfo(ListUpdateRequest listUpdateRequest, String id) throws ApiException { okhttp3.Call localVarCall = listIdUpdateValidateBeforeCall(listUpdateRequest, id, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Update List (asynchronously) * Update a List that you own. * @param listUpdateRequest (optional) * @param id The ID of the List to modify (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listIdUpdateAsync(ListUpdateRequest listUpdateRequest, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listIdUpdateValidateBeforeCall(listUpdateRequest, id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listRemoveMember * @param id The ID of the List to remove a member (required) * @param userId The ID of user that will be removed from the List (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listRemoveMemberCall(String id, String userId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/lists/{id}/members/{user_id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) .replaceAll("\\{" + "user_id" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listRemoveMemberValidateBeforeCall(String id, String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listRemoveMember(Async)"); } // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling listRemoveMember(Async)"); } okhttp3.Call localVarCall = listRemoveMemberCall(id, userId, _callback); return localVarCall; } /** * Remove a List member * Causes a user to be removed from the members of a List. * @param id The ID of the List to remove a member (required) * @param userId The ID of user that will be removed from the List (required) * @return ListMemberResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListMemberResponse listRemoveMember(String id, String userId) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listRemoveMemberWithHttpInfo(id, userId); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listRemoveMemberWithHttpInfo(id, userId); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Remove a List member * Causes a user to be removed from the members of a List. * @param id The ID of the List to remove a member (required) * @param userId The ID of user that will be removed from the List (required) * @return ApiResponse<ListMemberResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listRemoveMemberWithHttpInfo(String id, String userId) throws ApiException { okhttp3.Call localVarCall = listRemoveMemberValidateBeforeCall(id, userId, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Remove a List member (asynchronously) * Causes a user to be removed from the members of a List. * @param id The ID of the List to remove a member (required) * @param userId The ID of user that will be removed from the List (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listRemoveMemberAsync(String id, String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listRemoveMemberValidateBeforeCall(id, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserFollow * @param listFollowRequest (optional) * @param id The ID of the authenticated source user that will follow the List (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserFollowCall(ListFollowRequest listFollowRequest, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = listFollowRequest; // create path and map variables String localVarPath = "/2/users/{id}/followed_lists" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserFollowValidateBeforeCall(ListFollowRequest listFollowRequest, String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserFollow(Async)"); } okhttp3.Call localVarCall = listUserFollowCall(listFollowRequest, id, _callback); return localVarCall; } /** * Follow a List * Causes a user to follow a List. * @param listFollowRequest (optional) * @param id The ID of the authenticated source user that will follow the List (required) * @return ListFollowedResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListFollowedResponse listUserFollow(ListFollowRequest listFollowRequest, String id) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserFollowWithHttpInfo(listFollowRequest, id); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserFollowWithHttpInfo(listFollowRequest, id); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Follow a List * Causes a user to follow a List. * @param listFollowRequest (optional) * @param id The ID of the authenticated source user that will follow the List (required) * @return ApiResponse<ListFollowedResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserFollowWithHttpInfo(ListFollowRequest listFollowRequest, String id) throws ApiException { okhttp3.Call localVarCall = listUserFollowValidateBeforeCall(listFollowRequest, id, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Follow a List (asynchronously) * Causes a user to follow a List. * @param listFollowRequest (optional) * @param id The ID of the authenticated source user that will follow the List (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserFollowAsync(ListFollowRequest listFollowRequest, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserFollowValidateBeforeCall(listFollowRequest, id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserOwnedLists * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserOwnedListsCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/owned_lists" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("max_results", maxResults)); } if (paginationToken != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination_token", paginationToken)); } if (listFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "list.fields", listFields)); } if (expansions != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "expansions", expansions)); } if (userFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "user.fields", userFields)); } final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken", "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserOwnedListsValidateBeforeCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserOwnedLists(Async)"); } okhttp3.Call localVarCall = listUserOwnedListsCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); return localVarCall; } /** * Get a User's Owned Lists * Get a User's Owned Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return MultiListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public MultiListResponse listUserOwnedLists(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserOwnedListsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserOwnedListsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Get a User's Owned Lists * Get a User's Owned Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return ApiResponse<MultiListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserOwnedListsWithHttpInfo(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { okhttp3.Call localVarCall = listUserOwnedListsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Get a User's Owned Lists (asynchronously) * Get a User's Owned Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserOwnedListsAsync(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserOwnedListsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserPin * @param listPinRequest (optional) * @param id The ID of the authenticated source user that will pin the List (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserPinCall(ListPinRequest listPinRequest, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = listPinRequest; // create path and map variables String localVarPath = "/2/users/{id}/pinned_lists" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserPinValidateBeforeCall(ListPinRequest listPinRequest, String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserPin(Async)"); } okhttp3.Call localVarCall = listUserPinCall(listPinRequest, id, _callback); return localVarCall; } /** * Pin a List * Causes a user to pin a List. * @param listPinRequest (optional) * @param id The ID of the authenticated source user that will pin the List (required) * @return ListPinnedResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListPinnedResponse listUserPin(ListPinRequest listPinRequest, String id) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserPinWithHttpInfo(listPinRequest, id); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserPinWithHttpInfo(listPinRequest, id); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Pin a List * Causes a user to pin a List. * @param listPinRequest (optional) * @param id The ID of the authenticated source user that will pin the List (required) * @return ApiResponse<ListPinnedResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserPinWithHttpInfo(ListPinRequest listPinRequest, String id) throws ApiException { okhttp3.Call localVarCall = listUserPinValidateBeforeCall(listPinRequest, id, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Pin a List (asynchronously) * Causes a user to pin a List. * @param listPinRequest (optional) * @param id The ID of the authenticated source user that will pin the List (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserPinAsync(ListPinRequest listPinRequest, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserPinValidateBeforeCall(listPinRequest, id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserPinnedLists * @param id The ID of the user for whom to return results (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserPinnedListsCall(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/pinned_lists" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (listFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "list.fields", listFields)); } if (expansions != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "expansions", expansions)); } if (userFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "user.fields", userFields)); } final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserPinnedListsValidateBeforeCall(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserPinnedLists(Async)"); } okhttp3.Call localVarCall = listUserPinnedListsCall(id, listFields, expansions, userFields, _callback); return localVarCall; } /** * Get a User's Pinned Lists * Get a User's Pinned Lists. * @param id The ID of the user for whom to return results (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return MultiListNoPaginationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public MultiListNoPaginationResponse listUserPinnedLists(String id, Set listFields, Set expansions, Set userFields) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserPinnedListsWithHttpInfo(id, listFields, expansions, userFields); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserPinnedListsWithHttpInfo(id, listFields, expansions, userFields); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Get a User's Pinned Lists * Get a User's Pinned Lists. * @param id The ID of the user for whom to return results (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return ApiResponse<MultiListNoPaginationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserPinnedListsWithHttpInfo(String id, Set listFields, Set expansions, Set userFields) throws ApiException { okhttp3.Call localVarCall = listUserPinnedListsValidateBeforeCall(id, listFields, expansions, userFields, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Get a User's Pinned Lists (asynchronously) * Get a User's Pinned Lists. * @param id The ID of the user for whom to return results (required) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserPinnedListsAsync(String id, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserPinnedListsValidateBeforeCall(id, listFields, expansions, userFields, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserUnfollow * @param id The ID of the authenticated source user that will unfollow the List (required) * @param listId The ID of the List to unfollow (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserUnfollowCall(String id, String listId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/followed_lists/{list_id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) .replaceAll("\\{" + "list_id" + "\\}", localVarApiClient.escapeString(listId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserUnfollowValidateBeforeCall(String id, String listId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserUnfollow(Async)"); } // verify the required parameter 'listId' is set if (listId == null) { throw new ApiException("Missing the required parameter 'listId' when calling listUserUnfollow(Async)"); } okhttp3.Call localVarCall = listUserUnfollowCall(id, listId, _callback); return localVarCall; } /** * Unfollow a List * Causes a user to unfollow a List. * @param id The ID of the authenticated source user that will unfollow the List (required) * @param listId The ID of the List to unfollow (required) * @return ListFollowedResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListFollowedResponse listUserUnfollow(String id, String listId) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserUnfollowWithHttpInfo(id, listId); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserUnfollowWithHttpInfo(id, listId); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Unfollow a List * Causes a user to unfollow a List. * @param id The ID of the authenticated source user that will unfollow the List (required) * @param listId The ID of the List to unfollow (required) * @return ApiResponse<ListFollowedResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserUnfollowWithHttpInfo(String id, String listId) throws ApiException { okhttp3.Call localVarCall = listUserUnfollowValidateBeforeCall(id, listId, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Unfollow a List (asynchronously) * Causes a user to unfollow a List. * @param id The ID of the authenticated source user that will unfollow the List (required) * @param listId The ID of the List to unfollow (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserUnfollowAsync(String id, String listId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserUnfollowValidateBeforeCall(id, listId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUserUnpin * @param id The ID of the authenticated source user that will remove the pinned List (required) * @param listId The ID of the List to unpin (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserUnpinCall(String id, String listId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/pinned_lists/{list_id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())) .replaceAll("\\{" + "list_id" + "\\}", localVarApiClient.escapeString(listId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserUnpinValidateBeforeCall(String id, String listId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling listUserUnpin(Async)"); } // verify the required parameter 'listId' is set if (listId == null) { throw new ApiException("Missing the required parameter 'listId' when calling listUserUnpin(Async)"); } okhttp3.Call localVarCall = listUserUnpinCall(id, listId, _callback); return localVarCall; } /** * Unpin a List * Causes a user to remove a pinned List. * @param id The ID of the authenticated source user that will remove the pinned List (required) * @param listId The ID of the List to unpin (required) * @return ListPinnedResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ListPinnedResponse listUserUnpin(String id, String listId) throws ApiException { ApiResponse localVarResp; try{ localVarResp = listUserUnpinWithHttpInfo(id, listId); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = listUserUnpinWithHttpInfo(id, listId); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Unpin a List * Causes a user to remove a pinned List. * @param id The ID of the authenticated source user that will remove the pinned List (required) * @param listId The ID of the List to unpin (required) * @return ApiResponse<ListPinnedResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse listUserUnpinWithHttpInfo(String id, String listId) throws ApiException { okhttp3.Call localVarCall = listUserUnpinValidateBeforeCall(id, listId, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Unpin a List (asynchronously) * Causes a user to remove a pinned List. * @param id The ID of the authenticated source user that will remove the pinned List (required) * @param listId The ID of the List to unpin (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call listUserUnpinAsync(String id, String listId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listUserUnpinValidateBeforeCall(id, listId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for userFollowedLists * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call userFollowedListsCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/2/users/{id}/followed_lists" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("max_results", maxResults)); } if (paginationToken != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagination_token", paginationToken)); } if (listFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "list.fields", listFields)); } if (expansions != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "expansions", expansions)); } if (userFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "user.fields", userFields)); } final String[] localVarAccepts = { "application/json", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken", "OAuth2UserToken", "UserToken" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, reduceAuthNames(localVarAuthNames), _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call userFollowedListsValidateBeforeCall(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling userFollowedLists(Async)"); } okhttp3.Call localVarCall = userFollowedListsCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); return localVarCall; } /** * Get User's Followed Lists * Returns a user's followed Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return MultiListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public MultiListResponse userFollowedLists(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { ApiResponse localVarResp; try{ localVarResp = userFollowedListsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } catch (ApiException e) { if (isOAUth2AutoRefreshToken() && e.getCode() == 401) { refreshToken(); localVarResp = userFollowedListsWithHttpInfo(id, maxResults, paginationToken, listFields, expansions, userFields); } else { throw e; } } return localVarResp != null ? localVarResp.getData() : null; } /** * Get User's Followed Lists * Returns a user's followed Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @return ApiResponse<MultiListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public ApiResponse userFollowedListsWithHttpInfo(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields) throws ApiException { okhttp3.Call localVarCall = userFollowedListsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); e.setErrorObjectType(new GenericType(){}); throw e; } } /** * Get User's Followed Lists (asynchronously) * Returns a user's followed Lists. * @param id The ID of the user for whom to return results (required) * @param maxResults The maximum number of results (optional, default to 100) * @param paginationToken This parameter is used to get a specified 'page' of results. (optional) * @param listFields A comma separated list of List fields to display. (optional) * @param expansions A comma separated list of fields to expand. (optional) * @param userFields A comma separated list of User fields to display. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request was successful -
0 The request has failed. -
*/ public okhttp3.Call userFollowedListsAsync(String id, Integer maxResults, Long paginationToken, Set listFields, Set expansions, Set userFields, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = userFollowedListsValidateBeforeCall(id, maxResults, paginationToken, listFields, expansions, userFields, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy