nxt.http

## Class APICall.Builder<T extends APICall.Builder>

- java.lang.Object
- - nxt.http.APICall.Builder<T>

- Direct Known Subclasses:
    AddBundlingRuleCall, AddPeerCall, BlacklistAPIProxyPeerCall, BlacklistBundlerCall, BlacklistPeerCall, BroadcastTransactionCall, CalculateFeeCall, CalculateFullHashCall, CanDeleteCurrencyCall, ClearUnconfirmedTransactionsCall, CombineSecretCall, CreateTransactionCallBuilder, DecodeFileTokenCall, DecodeQRCodeCall, DecodeTokenCall, DecryptFromCall, DetectMimeTypeCall, DownloadPrunableMessageCall, DownloadTaggedDataCall, DumpPeersCall, EncodeQRCodeCall, EncryptToCall, EvaluateExpressionCall, EventRegisterCall, EventWaitCall, FullHashToIdCall, FullResetCall, GenerateFileTokenCall, GenerateTokenCall, GetAccountAssetCountCall, GetAccountAssetsCall, GetAccountBlockCountCall, GetAccountBlockIdsCall, GetAccountBlocksCall, GetAccountCall, GetAccountCurrenciesCall, GetAccountCurrencyCountCall, GetAccountCurrentAskOrderIdsCall, GetAccountCurrentAskOrdersCall, GetAccountCurrentBidOrderIdsCall, GetAccountCurrentBidOrdersCall, GetAccountExchangeRequestsCall, GetAccountIdCall, GetAccountLedgerCall, GetAccountLedgerEntryCall, GetAccountLessorsCall, GetAccountPhasedTransactionCountCall, GetAccountPhasedTransactionsCall, GetAccountPropertiesCall, GetAccountPublicKeyCall, GetAccountShufflingsCall, GetAccountTaggedDataCall, GetAliasCall, GetAliasCountCall, GetAliasesCall, GetAliasesLikeCall, GetAllAssetsCall, GetAllBroadcastedTransactionsCall, GetAllBundlerRatesCall, GetAllCurrenciesCall, GetAllExchangesCall, GetAllOpenAskOrdersCall, GetAllOpenBidOrdersCall, GetAllPhasingOnlyControlsCall, GetAllPrunableMessagesCall, GetAllShufflingsCall, GetAllTaggedDataCall, GetAllTradesCall, GetAllWaitingTransactionsCall, GetAskOrderCall, GetAskOrderIdsCall, GetAskOrdersCall, GetAssetAccountCountCall, GetAssetAccountsCall, GetAssetCall, GetAssetDividendsCall, GetAssetHistoryCall, GetAssetIdsCall, GetAssetPhasedTransactionsCall, GetAssetPropertiesCall, GetAssetsByIssuerCall, GetAssetsCall, GetAssetTransfersCall, GetAssignedShufflingsCall, GetAvailableToBuyCall, GetAvailableToSellCall, GetBalanceCall, GetBalancesCall, GetBidOrderCall, GetBidOrderIdsCall, GetBidOrdersCall, GetBlockCall, GetBlockchainStatusCall, GetBlockchainTransactionsCall, GetBlockIdCall, GetBlocksCall, GetBundlerRatesCall, GetBundlersCall, GetBundlingOptionsCall, GetBuyOffersCall, GetChannelTaggedDataCall, GetCoinExchangeOrderCall, GetCoinExchangeOrderIdsCall, GetCoinExchangeOrdersCall, GetCoinExchangeTradeCall, GetCoinExchangeTradesCall, GetConstantsCall, GetContractReferencesCall, GetCurrenciesByIssuerCall, GetCurrenciesCall, GetCurrencyAccountCountCall, GetCurrencyAccountsCall, GetCurrencyCall, GetCurrencyFoundersCall, GetCurrencyIdsCall, GetCurrencyPhasedTransactionsCall, GetCurrencyTransfersCall, GetDataTagCountCall, GetDataTagsCall, GetDataTagsLikeCall, GetDGSExpiredPurchasesCall, GetDGSGoodCall, GetDGSGoodsCall, GetDGSGoodsCountCall, GetDGSGoodsPurchaseCountCall, GetDGSGoodsPurchasesCall, GetDGSPendingPurchasesCall, GetDGSPurchaseCall, GetDGSPurchaseCountCall, GetDGSPurchasesCall, GetDGSTagCountCall, GetDGSTagsCall, GetDGSTagsLikeCall, GetECBlockCall, GetEffectiveBalanceCall, GetExchangesByExchangeRequestCall, GetExchangesByOfferCall, GetExchangesCall, GetExecutedTransactionsCall, GetExpectedAskOrdersCall, GetExpectedAssetDeletesCall, GetExpectedAssetTransfersCall, GetExpectedBidOrdersCall, GetExpectedBuyOffersCall, GetExpectedCoinExchangeOrderCancellationsCall, GetExpectedCoinExchangeOrdersCall, GetExpectedCurrencyTransfersCall, GetExpectedExchangeRequestsCall, GetExpectedOrderCancellationsCall, GetExpectedSellOffersCall, GetExpectedTransactionsCall, GetForgingCall, GetFundingMonitorCall, GetFxtTransactionCall, GetGuaranteedBalanceCall, GetHashedSecretPhasedTransactionsCall, GetHoldingShufflingsCall, GetLastExchangesCall, GetLastTradesCall, GetLinkedPhasedTransactionsCall, GetLogCall, GetMintingTargetCall, GetMyInfoCall, GetNextBlockGeneratorsCall, GetOfferCall, GetOrderTradesCall, GetPeerCall, GetPeersCall, GetPhasingAssetControlCall, GetPhasingOnlyControlCall, GetPhasingPollCall, GetPhasingPollVoteCall, GetPhasingPollVotesCall, GetPluginsCall, GetPollCall, GetPollResultCall, GetPollsCall, GetPollVoteCall, GetPollVotesCall, GetPrunableMessageCall, GetPrunableMessagesCall, GetReferencingTransactionsCall, GetSellOffersCall, GetSharedKeyCall, GetShufflersCall, GetShufflingCall, GetShufflingParticipantsCall, GetStackTracesCall, GetStandbyShufflersCall, GetStateCall, GetSupportedContractsCall, GetTaggedDataCall, GetTimeCall, GetTradesCall, GetTransactionBytesCall, GetTransactionCall, GetUnconfirmedTransactionIdsCall, GetUnconfirmedTransactionsCall, GetVoterPhasedTransactionsCall, HashCall, HexConvertCall, LongConvertCall, LuceneReindexCall, ManagePeersNetworkingCall, ParsePhasingParamsCall, ParseTransactionCall, PopOffCall, ProcessVoucherCall, ReadMessageCall, RebroadcastUnconfirmedTransactionsCall, RequeueUnconfirmedTransactionsCall, RetrievePrunedDataCall, RetrievePrunedTransactionCall, RsConvertCall, ScanCall, SearchAccountsCall, SearchAssetsCall, SearchCurrenciesCall, SearchDGSGoodsCall, SearchPollsCall, SearchTaggedDataCall, SendTransactionCall, SetAPIProxyPeerCall, SetLoggingCall, ShutdownCall, SignTransactionCall, SimulateCoinExchangeCall, SplitSecretCall, StartBundlerCall, StartForgingCall, StartFundingMonitorCall, StartShufflerCall, StartStandbyShufflerCall, StopBundlerCall, StopForgingCall, StopFundingMonitorCall, StopShufflerCall, StopStandbyShufflerCall, TriggerContractByHeightCall, TriggerContractByRequestCall, TriggerContractByTransactionCall, TriggerContractByVoucherCall, TrimDerivedTablesCall, UploadContractRunnerConfigurationCall, VerifyPrunableMessageCall, VerifyTaggedDataCall
  Enclosing class:
    APICall

      public static class APICall.Builder<T extends APICall.Builder>
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>` | `params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder(ApiSpec apiSpec)`
    `Builder(java.lang.String requestType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `APICall` | `build()`
    `JO` | `call()`
    `T` | `chain(int chainId)`
    `T` | `chain(java.lang.String chain)`
    `byte[]` | `download()`
    `T` | `feeNQT(long value)`
    `T` | `feeRateNQTPerFXT(long value)`
    `BlockResponse` | `getBlock()`
    `java.util.List<BlockResponse>` | `getBlocks()`
    `Chain` | `getChain()`
    `TransactionResponse` | `getCreatedTransaction()` Use to parse responses of create transaction API
    `java.util.List<TransactionResponse>` | `getCreatedTransactions()` Response from CreateTransaction calls wraps the transactions inside a transactionJSON object
    `java.lang.String` | `getParam(java.lang.String key)`
    `TransactionResponse` | `getTransaction()` Use to parse responses of APIs which return a transaction object like getTransaction
    `java.util.List<TransactionResponse>` | `getTransactions()` Use with any API which returns a "transactions" json array
    `java.util.List<TransactionResponse>` | `getTransactions(java.lang.String arrayName)` Use in case the response transaction array has a different name
    `boolean` | `isParamSet(java.lang.String key)`
    `boolean` | `isRemoteOnly()`
    `T` | `param(java.lang.String key, boolean value)`
    `T` | `param(java.lang.String key, byte value)`
    `T` | `param(java.lang.String key, byte[] value)`
    `T` | `param(java.lang.String key, byte[][] value)`
    `T` | `param(java.lang.String key, int... intArray)`
    `T` | `param(java.lang.String key, int value)`
    `T` | `param(java.lang.String key, java.util.List<java.lang.String> values)`
    `T` | `param(java.lang.String key, long... longArray)`
    `T` | `param(java.lang.String key, long value)`
    `T` | `param(java.lang.String key, java.lang.String value)`
    `T` | `param(java.lang.String key, java.lang.String[] values)`
    `T` | `parts(java.lang.String key, byte[] b)`
    `T` | `recipient(long id)`
    `T` | `recipient(java.lang.String recipient)`
    `T` | `remote(java.net.URL url)`
    `T` | `secretPhrase(java.lang.String value)`
    `T` | `setParamValidation(boolean isEnabled)`
    `T` | `sharedPiece(java.lang.String... sharedPiece)`
    `T` | `sharedPieceAccount(java.lang.String value)`
    `T` | `trustRemoteCertificate(boolean trustRemoteCertificate)`
    `T` | `unsignedLongParam(java.lang.String key, long... longArray)`
    `T` | `unsignedLongParam(java.lang.String key, long value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### params

          protected final java.util.Map<java.lang.String,java.util.List<java.lang.String>> params

  - ### Constructor Detail

    - #### Builder

          public Builder(java.lang.String requestType)

    - #### Builder

          public Builder(ApiSpec apiSpec)

  - ### Method Detail

    - #### remote

          public T remote(java.net.URL url)

    - #### trustRemoteCertificate

          public T trustRemoteCertificate(boolean trustRemoteCertificate)

    - #### isRemoteOnly

          public boolean isRemoteOnly()

    - #### setParamValidation

          public T setParamValidation(boolean isEnabled)

    - #### param

          public T param(java.lang.String key,
                         java.lang.String value)

    - #### param

          public T param(java.lang.String key,
                         java.lang.String[] values)

    - #### param

          public T param(java.lang.String key,
                         java.util.List<java.lang.String> values)

    - #### param

          public T param(java.lang.String key,
                         boolean value)

    - #### param

          public T param(java.lang.String key,
                         byte value)

    - #### param

          public T param(java.lang.String key,
                         int value)

    - #### param

          public T param(java.lang.String key,
                         int... intArray)

    - #### param

          public T param(java.lang.String key,
                         long value)

    - #### param

          public T param(java.lang.String key,
                         long... longArray)

    - #### unsignedLongParam

          public T unsignedLongParam(java.lang.String key,
                                     long value)

    - #### unsignedLongParam

          public T unsignedLongParam(java.lang.String key,
                                     long... longArray)

    - #### param

          public T param(java.lang.String key,
                         byte[] value)

    - #### param

          public T param(java.lang.String key,
                         byte[][] value)

    - #### secretPhrase

          public T secretPhrase(java.lang.String value)

    - #### sharedPiece

          public T sharedPiece(java.lang.String... sharedPiece)

    - #### sharedPieceAccount

          public T sharedPieceAccount(java.lang.String value)

    - #### chain

          public T chain(java.lang.String chain)

    - #### chain

          public T chain(int chainId)

    - #### feeNQT

          public T feeNQT(long value)

    - #### feeRateNQTPerFXT

          public T feeRateNQTPerFXT(long value)

    - #### recipient

          public T recipient(long id)

    - #### recipient

          public T recipient(java.lang.String recipient)

    - #### getParam

          public java.lang.String getParam(java.lang.String key)

    - #### getChain

          public Chain getChain()

    - #### isParamSet

          public boolean isParamSet(java.lang.String key)

    - #### parts

          public T parts(java.lang.String key,
                         byte[] b)

    - #### build

          public APICall build()

    - #### call

          public JO call()

    - #### download

          public byte[] download()

    - #### getTransactions

          public java.util.List<TransactionResponse> getTransactions()

      Use with any API which returns a "transactions" json array
      Returns:
        list of transaction objects

    - #### getTransactions

          public java.util.List<TransactionResponse> getTransactions(java.lang.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 java.util.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 java.util.List<BlockResponse> getBlocks()

    - #### getBlock

          public BlockResponse getBlock()