Package com.twitter.clientlib.api
Class SpacesApi.APIsearchSpacesRequest
- java.lang.Object
-
- com.twitter.clientlib.api.SpacesApi.APIsearchSpacesRequest
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description okhttp3.Call
buildCall(ApiCallback _callback)
Build call for searchSpacesGet2SpacesSearchResponse
execute()
Execute searchSpaces requestGet2SpacesSearchResponse
execute(Integer retries)
Calls the API using a retry mechanism to handle rate limits errors.okhttp3.Call
executeAsync(ApiCallback<Get2SpacesSearchResponse> _callback)
Execute searchSpaces request (asynchronously)ApiResponse<Get2SpacesSearchResponse>
executeWithHttpInfo()
Execute searchSpaces request with HTTP info returnedSpacesApi.APIsearchSpacesRequest
expansions(Set<String> expansions)
Set expansionsSpacesApi.APIsearchSpacesRequest
maxResults(Integer maxResults)
Set maxResultsSpacesApi.APIsearchSpacesRequest
spaceFields(Set<String> spaceFields)
Set spaceFieldsSpacesApi.APIsearchSpacesRequest
state(String state)
Set stateSpacesApi.APIsearchSpacesRequest
topicFields(Set<String> topicFields)
Set topicFieldsSpacesApi.APIsearchSpacesRequest
userFields(Set<String> userFields)
Set userFields
-
-
-
Method Detail
-
state
public SpacesApi.APIsearchSpacesRequest state(String state)
Set state- Parameters:
state
- The state of Spaces to search for. (optional, default to all)- Returns:
- APIsearchSpacesRequest
-
maxResults
public SpacesApi.APIsearchSpacesRequest maxResults(Integer maxResults)
Set maxResults- Parameters:
maxResults
- The number of results to return. (optional, default to 100)- Returns:
- APIsearchSpacesRequest
-
spaceFields
public SpacesApi.APIsearchSpacesRequest spaceFields(Set<String> spaceFields)
Set spaceFields- Parameters:
spaceFields
- A comma separated list of Space fields to display. (optional)- Returns:
- APIsearchSpacesRequest
-
expansions
public SpacesApi.APIsearchSpacesRequest expansions(Set<String> expansions)
Set expansions- Parameters:
expansions
- A comma separated list of fields to expand. (optional)- Returns:
- APIsearchSpacesRequest
-
userFields
public SpacesApi.APIsearchSpacesRequest userFields(Set<String> userFields)
Set userFields- Parameters:
userFields
- A comma separated list of User fields to display. (optional)- Returns:
- APIsearchSpacesRequest
-
topicFields
public SpacesApi.APIsearchSpacesRequest topicFields(Set<String> topicFields)
Set topicFields- Parameters:
topicFields
- A comma separated list of Topic fields to display. (optional)- Returns:
- APIsearchSpacesRequest
-
buildCall
public okhttp3.Call buildCall(ApiCallback _callback) throws ApiException
Build call for searchSpaces- Parameters:
_callback
- ApiCallback API callback- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
execute
public Get2SpacesSearchResponse execute() throws ApiException
Execute searchSpaces request- Returns:
- Get2SpacesSearchResponse
- 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 has succeeded. - 0 The request has failed. -
-
execute
public Get2SpacesSearchResponse execute(Integer retries) throws ApiException
Calls the API using a retry mechanism to handle rate limits errors.- Throws:
ApiException
-
executeWithHttpInfo
public ApiResponse<Get2SpacesSearchResponse> executeWithHttpInfo() throws ApiException
Execute searchSpaces request with HTTP info returned- Returns:
- ApiResponse<Get2SpacesSearchResponse>
- 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 has succeeded. - 0 The request has failed. -
-
executeAsync
public okhttp3.Call executeAsync(ApiCallback<Get2SpacesSearchResponse> _callback) throws ApiException
Execute searchSpaces request (asynchronously)- Parameters:
_callback
- The callback to be executed when the API call finishes- Returns:
- 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 has succeeded. - 0 The request has failed. -
-
-