public class AccountsRequestBuilder extends RequestBuilder
RequestBuilder.Order| Constructor and Description |
|---|
AccountsRequestBuilder(OkHttpClient httpClient,
HttpUrl serverURI) |
| Modifier and Type | Method and Description |
|---|---|
AccountResponse |
account(HttpUrl uri)
Requests specific
uri and returns AccountResponse. |
AccountsRequestBuilder |
cursor(java.lang.String token)
Sets
cursor parameter on the request. |
Page<AccountResponse> |
execute()
Build and execute request.
|
static Page<AccountResponse> |
execute(OkHttpClient httpClient,
HttpUrl uri)
|
AccountsRequestBuilder |
limit(int number)
Sets
limit parameter on the request. |
AccountsRequestBuilder |
order(RequestBuilder.Order direction)
Sets
order parameter on the request. |
EventSource |
stream(EventListener<AccountResponse> listener)
Allows to stream SSE events from horizon.
|
public AccountsRequestBuilder(OkHttpClient httpClient,
HttpUrl serverURI)
public AccountResponse account(HttpUrl uri) throws java.io.IOException
uri and returns AccountResponse.
This method is helpful for getting the links.java.io.IOExceptionpublic static Page<AccountResponse> execute(OkHttpClient httpClient, HttpUrl uri) throws java.io.IOException, TooManyRequestsException
uri and returns Page of AccountResponse.
This method is helpful for getting the next set of results.Page of AccountResponseTooManyRequestsException - when too many requests were sent to the Horizon server.java.io.IOExceptionpublic EventSource stream(EventListener<AccountResponse> listener)
listener - EventListener implementation with AccountResponse typeclose() connection when not needed anymorepublic Page<AccountResponse> execute() throws java.io.IOException, TooManyRequestsException
Page of AccountResponseTooManyRequestsException - when too many requests were sent to the Horizon server.java.io.IOExceptionpublic AccountsRequestBuilder cursor(java.lang.String token)
RequestBuildercursor parameter on the request.
A cursor is a value that points to a specific location in a collection of resources.
The cursor attribute itself is an opaque value meaning that users should not try to parse it.cursor in class RequestBuilderpublic AccountsRequestBuilder limit(int number)
RequestBuilderlimit parameter on the request.
It defines maximum number of records to return.
For range and default values check documentation of the endpoint requested.limit in class RequestBuildernumber - maxium number of records to returnpublic AccountsRequestBuilder order(RequestBuilder.Order direction)
RequestBuilderorder parameter on the request.order in class RequestBuilderdirection - RequestBuilder.Order