Package nxt.http

Class APICall.Builder<T extends APICall.Builder>

java.lang.Object
nxt.http.APICall.Builder<T>
Direct Known Subclasses:
AddPeerCall, BlacklistAPIProxyPeerCall, BlacklistBundlerCall, BlacklistPeerCall, BootstrapAPIProxyCall, BroadcastTransactionCall, CalculateFeeCall, CalculateFullHashCall, CanDeleteCurrencyCall, ChainSpecificCallBuilder, ClearUnconfirmedTransactionsCall, CombineSecretCall, DecodeFileTokenCall, DecodeQRCodeCall, DecodeTokenCall, DecryptFromCall, DeriveAccountFromMasterPublicKeyCall, DeriveAccountFromSeedCall, DetectMimeTypeCall, DumpPeersCall, EncodeQRCodeCall, EncryptToCall, EvaluateExpressionCall, EventRegisterCall, EventWaitCall, FullHashToIdCall, FullResetCall, GenerateFileTokenCall, GenerateTokenCall, GetAccountAssetCountCall, GetAccountAssetsCall, GetAccountBlockCountCall, GetAccountBlockIdsCall, GetAccountBlocksCall, GetAccountCall, GetAccountCurrenciesCall, GetAccountCurrencyCountCall, GetAccountIdCall, GetAccountLedgerCall, GetAccountLedgerEntryCall, GetAccountLessorsCall, GetAccountPropertiesCall, GetAccountPublicKeyCall, GetAllAssetsCall, GetAllBroadcastedTransactionsCall, GetAllBundlerRatesCall, GetAllCurrenciesCall, GetAllPhasingOnlyControlsCall, GetAllWaitingTransactionsCall, GetAPIProxyReportsCall, GetAssetAccountCountCall, GetAssetAccountsCall, GetAssetCall, GetAssetHistoryCall, GetAssetIdsCall, GetAssetPropertiesCall, GetAssetsByIssuerCall, GetAssetsCall, GetAssetTransfersCall, GetBlockCall, GetBlockchainStatusCall, GetBlockIdCall, GetBlocksCall, GetBundlerRatesCall, GetBundlingOptionsCall, GetCoinExchangeOrderCall, GetCoinExchangeTradeCall, GetConfigurationCall, GetConstantsCall, GetContractReferencesCall, GetCurrenciesByIssuerCall, GetCurrenciesCall, GetCurrencyAccountCountCall, GetCurrencyAccountsCall, GetCurrencyIdsCall, GetCurrencyTransfersCall, GetECBlockCall, GetEffectiveBalanceCall, GetEpochTimeCall, GetForgingCall, GetFxtTransactionCall, GetGuaranteedBalanceCall, GetHashedSecretPhasedTransactionsCall, GetLedgerMasterPublicKeyCall, GetLinkedPhasedTransactionsCall, GetLogCall, GetMintingTargetCall, GetMyInfoCall, GetNextBlockGeneratorsCall, GetPeerCall, GetPeersCall, GetPhasingAssetControlCall, GetPhasingOnlyControlCall, GetPluginsCall, GetSharedKeyCall, GetShufflersCall, GetStackTracesCall, GetSupportedContractsCall, GetTimeCall, HashCall, HexConvertCall, LongConvertCall, LuceneReindexCall, ManagePeersNetworkingCall, ParsePhasingParamsCall, ParseTransactionCall, PopOffCall, ProcessVoucherCall, RebroadcastUnconfirmedTransactionsCall, RequeueUnconfirmedTransactionsCall, RsConvertCall, SaveContractRunnerEncryptedCall, ScanCall, SearchAccountsCall, SearchAssetsCall, SearchCurrenciesCall, SendTransactionCall, SetAPIProxyPeerCall, SetConfigurationCall, SetLoggingCall, ShutdownCall, SignTransactionCall, SplitSecretCall, StartContractRunnerEncryptedCall, StartForgingCall, StopForgingCall, StopShufflerCall, TaxReportCall, TriggerContractByHeightCall, TriggerContractByRequestCall, TriggerContractByVoucherCall, TrimDerivedTablesCall, UploadContractRunnerConfigurationCall
Enclosing class:
APICall

public static class APICall.Builder<T extends APICall.Builder> extends Object
  • Field Details

  • Constructor Details

    • Builder

      protected Builder(ApiSpec apiSpec)
    • Builder

      protected Builder(String requestType, List<String> validParams, List<String> validFileParams, boolean isChainSpecific)
  • Method Details

    • remote

      public T remote(URL url)
    • trustRemoteCertificate

      public T trustRemoteCertificate(boolean trustRemoteCertificate)
    • isRemoteOnly

      public boolean isRemoteOnly()
    • setParamValidation

      public T setParamValidation(boolean isEnabled)
    • param

      public T param(String key, String value)
    • param

      public T param(String key, String[] values)
    • param

      public T param(String key, List<String> values)
    • param

      public T param(String key, boolean value)
    • param

      public T param(String key, byte value)
    • param

      public T param(String key, int value)
    • param

      public T param(String key, int... intArray)
    • param

      public T param(String key, long value)
    • param

      public T param(String key, long... longArray)
    • unsignedLongParam

      public T unsignedLongParam(String key, long value)
    • unsignedLongParam

      public T unsignedLongParam(String key, long... longArray)
    • param

      public T param(String key, byte[] value)
    • param

      public T param(String key, byte[][] value)
    • secretPhrase

      public T secretPhrase(String value)
    • privateKey

      public T privateKey(byte[] value)
    • privateKey

      public T privateKey(String value)
    • sharedPiece

      public T sharedPiece(String... sharedPiece)
    • sharedPieceAccount

      public T sharedPieceAccount(String value)
    • getParam

      public String getParam(String key)
    • getChain

      public Chain getChain()
    • isParamSet

      public boolean isParamSet(String key)
    • parts

      public T parts(String key, byte[] b)
    • build

      public APICall build()
    • call

      public JO call()
    • callNoError

      public JO callNoError()
    • download

      public byte[] download()
    • getTransactions

      public List<TransactionResponse> getTransactions()
      Use with any API which returns a "transactions" json array
      Returns:
      list of transaction objects
    • getTransactions

      public List<TransactionResponse> getTransactions(String arrayName)
      Use in case the response transaction array has a different name
      Parameters:
      arrayName - the name of the transaction array
      Returns:
      list of transaction objects
    • getCreatedTransactions

      public List<TransactionResponse> getCreatedTransactions()
      Response from CreateTransaction calls wraps the transactions inside a transactionJSON object
      Returns:
      list of transaction objects
    • getTransaction

      public TransactionResponse getTransaction()
      Use to parse responses of APIs which return a transaction object like getTransaction
      Returns:
      transaction object
    • getCreatedTransaction

      public TransactionResponse getCreatedTransaction()
      Use to parse responses of create transaction API
      Returns:
      transaction object
    • getBlocks

      public List<BlockResponse> getBlocks()
    • getBlock

      public BlockResponse getBlock()