Class RequestBuilder

java.lang.Object
org.stellar.sdk.requests.RequestBuilder
Direct Known Subclasses:
AccountsRequestBuilder, AssetsRequestBuilder, ClaimableBalancesRequestBuilder, EffectsRequestBuilder, FeeStatsRequestBuilder, LedgersRequestBuilder, LiquidityPoolsRequestBuilder, OffersRequestBuilder, OperationsRequestBuilder, OrderBookRequestBuilder, PaymentsRequestBuilder, RootRequestBuilder, StrictReceivePathsRequestBuilder, StrictSendPathsRequestBuilder, TradeAggregationsRequestBuilder, TradesRequestBuilder, TransactionsRequestBuilder

public abstract class RequestBuilder extends Object
Abstract class for request builders.
  • Method Details

    • cursor

      public RequestBuilder cursor(String cursor)
      Sets 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.
      Parameters:
      cursor - A cursor is a value that points to a specific location in a collection of resources.
      See Also:
    • limit

      public RequestBuilder limit(int number)
      Sets limit parameter on the request. It defines maximum number of records to return. For range and default values check documentation of the endpoint requested.
      Parameters:
      number - maxium number of records to return
    • order

      public RequestBuilder order(RequestBuilder.Order direction)
      Sets order parameter on the request.
      Parameters:
      direction - RequestBuilder.Order
    • setAssetsParameter

      public void setAssetsParameter(String name, List<Asset> assets)
      Sets a parameter consisting of a comma separated list of assets on the request.
      Parameters:
      name - the name of the query parameter
      assets - the list of assets to be serialized into the query parameter value
    • setAssetParameter

      public void setAssetParameter(String name, Asset asset)
      Sets a parameter consisting of an asset represented as "assetCode:assetIssue" on the request.
      Parameters:
      name - the name of the query parameter
      asset - the asset to be serialized into the query parameter value