public class AssetsRequestBuilder extends RequestBuilder
RequestBuilder.Order
Constructor and Description |
---|
AssetsRequestBuilder(okhttp3.OkHttpClient httpClient,
okhttp3.HttpUrl serverURI) |
Modifier and Type | Method and Description |
---|---|
AssetsRequestBuilder |
assetCode(java.lang.String assetCode) |
AssetsRequestBuilder |
assetIssuer(java.lang.String assetIssuer) |
AssetsRequestBuilder |
cursor(java.lang.String token)
Sets
cursor parameter on the request. |
Page<AssetResponse> |
execute()
Build and execute request.
|
static Page<AssetResponse> |
execute(okhttp3.OkHttpClient httpClient,
okhttp3.HttpUrl uri)
|
AssetsRequestBuilder |
limit(int number)
Sets
limit parameter on the request. |
AssetsRequestBuilder |
order(RequestBuilder.Order direction)
Sets
order parameter on the request. |
setAssetParameter, setAssetsParameter
public AssetsRequestBuilder(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl serverURI)
public AssetsRequestBuilder assetCode(java.lang.String assetCode)
public AssetsRequestBuilder assetIssuer(java.lang.String assetIssuer)
public static Page<AssetResponse> execute(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri)
uri
and returns Page
of AssetResponse
. This *
method is helpful for getting the next set of results.httpClient
- OkHttpClient
to use to send the request.uri
- HttpUrl
URI to send the request to.Page
of AssetResponse
NetworkException
- All the exceptions below are subclasses of
NetworkErrorBadRequestException
- if the request fails due to a bad request
(4xx)BadResponseException
- if the request fails due to a bad
response from the server (5xx)TooManyRequestsException
- if the request fails due to too many requests sent to the
serverRequestTimeoutException
- When Horizon returns a Timeout
or connection timeout occurredUnknownResponseException
- if the server returns an unknown
status codeConnectionErrorException
- When the request cannot be executed due to cancellation or
connectivity problems, etc.public Page<AssetResponse> execute()
Page
of AssetResponse
NetworkException
- All the exceptions below are subclasses of
NetworkErrorBadRequestException
- if the request fails due to a bad request
(4xx)BadResponseException
- if the request fails due to a bad
response from the server (5xx)TooManyRequestsException
- if the request fails due to too many requests sent to the
serverRequestTimeoutException
- When Horizon returns a Timeout
or connection timeout occurredUnknownResponseException
- if the server returns an unknown
status codeConnectionErrorException
- When the request cannot be executed due to cancellation or
connectivity problems, etc.public AssetsRequestBuilder cursor(java.lang.String token)
RequestBuilder
cursor
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 RequestBuilder
token
- A cursor is a value that points to a specific location in a collection of
resources.public AssetsRequestBuilder limit(int number)
RequestBuilder
limit
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 RequestBuilder
number
- maxium number of records to returnpublic AssetsRequestBuilder order(RequestBuilder.Order direction)
RequestBuilder
order
parameter on the request.order
in class RequestBuilder
direction
- RequestBuilder.Order