Package nxt.http
Class APICall.Builder<T extends APICall.Builder>
- java.lang.Object
-
- nxt.http.APICall.Builder<T>
-
- Direct Known Subclasses:
AddPeerCall
,BlacklistAPIProxyPeerCall
,BlacklistPeerCall
,BootstrapAPIProxyCall
,BroadcastTransactionCall
,CalculateFullHashCall
,CanDeleteCurrencyCall
,ClearUnconfirmedTransactionsCall
,CreateTransactionCallBuilder
,DecodeFileTokenCall
,DecodeHallmarkCall
,DecodeQRCodeCall
,DecodeTokenCall
,DecryptFromCall
,DeleteScheduledTransactionCall
,DetectMimeTypeCall
,DownloadPrunableMessageCall
,DownloadTaggedDataCall
,DumpPeersCall
,EncodeQRCodeCall
,EncryptToCall
,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
,GetAllCurrenciesCall
,GetAllExchangesCall
,GetAllOpenAskOrdersCall
,GetAllOpenBidOrdersCall
,GetAllPhasingOnlyControlsCall
,GetAllPrunableMessagesCall
,GetAllShufflingsCall
,GetAllTaggedDataCall
,GetAllTradesCall
,GetAllWaitingTransactionsCall
,GetAskOrderCall
,GetAskOrderIdsCall
,GetAskOrdersCall
,GetAssetAccountCountCall
,GetAssetAccountsCall
,GetAssetCall
,GetAssetDeletesCall
,GetAssetDividendsCall
,GetAssetHistoryCall
,GetAssetIdsCall
,GetAssetPhasedTransactionsCall
,GetAssetPropertiesCall
,GetAssetsByIssuerCall
,GetAssetsCall
,GetAssetTransfersCall
,GetAssignedShufflingsCall
,GetAvailableToBuyCall
,GetAvailableToSellCall
,GetBalanceCall
,GetBidOrderCall
,GetBidOrderIdsCall
,GetBidOrdersCall
,GetBlockCall
,GetBlockchainStatusCall
,GetBlockchainTransactionsCall
,GetBlockIdCall
,GetBlocksCall
,GetBuyOffersCall
,GetChannelTaggedDataCall
,GetConstantsCall
,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
,GetEpochTimeCall
,GetExchangesByExchangeRequestCall
,GetExchangesByOfferCall
,GetExchangesCall
,GetExpectedAskOrdersCall
,GetExpectedAssetDeletesCall
,GetExpectedAssetTransfersCall
,GetExpectedBidOrdersCall
,GetExpectedBuyOffersCall
,GetExpectedCurrencyTransfersCall
,GetExpectedExchangeRequestsCall
,GetExpectedOrderCancellationsCall
,GetExpectedSellOffersCall
,GetExpectedTransactionsCall
,GetForgingCall
,GetFundingMonitorCall
,GetGuaranteedBalanceCall
,GetHoldingShufflingsCall
,GetInboundPeersCall
,GetLastExchangesCall
,GetLastTradesCall
,GetLinkedPhasedTransactionsCall
,GetLogCall
,GetMintingTargetCall
,GetMyInfoCall
,GetNextBlockGeneratorsCall
,GetOfferCall
,GetOrderTradesCall
,GetPeerCall
,GetPeersCall
,GetPhasingOnlyControlCall
,GetPhasingPollCall
,GetPhasingPollsCall
,GetPhasingPollVoteCall
,GetPhasingPollVotesCall
,GetPluginsCall
,GetPollCall
,GetPollResultCall
,GetPollsCall
,GetPollVoteCall
,GetPollVotesCall
,GetPrunableMessageCall
,GetPrunableMessagesCall
,GetReferencingTransactionsCall
,GetScheduledTransactionsCall
,GetSellOffersCall
,GetSharedKeyCall
,GetShufflersCall
,GetShufflingCall
,GetShufflingParticipantsCall
,GetStackTracesCall
,GetStateCall
,GetTaggedDataCall
,GetTaggedDataExtendTransactionsCall
,GetTimeCall
,GetTradesCall
,GetTransactionBytesCall
,GetTransactionCall
,GetUnconfirmedTransactionIdsCall
,GetUnconfirmedTransactionsCall
,GetVoterPhasedTransactionsCall
,HashCall
,HexConvertCall
,LongConvertCall
,LuceneReindexCall
,ManagePeersNetworkingCall
,MarkHostCall
,ParseTransactionCall
,PopOffCall
,ReadMessageCall
,RebroadcastUnconfirmedTransactionsCall
,RequeueUnconfirmedTransactionsCall
,RetrievePrunedDataCall
,RetrievePrunedTransactionCall
,RsConvertCall
,ScanCall
,SearchAccountsCall
,SearchAssetsCall
,SearchCurrenciesCall
,SearchDGSGoodsCall
,SearchPollsCall
,SearchTaggedDataCall
,SendTransactionCall
,SetAPIProxyPeerCall
,SetLoggingCall
,ShutdownCall
,SignTransactionCall
,StartForgingCall
,StartFundingMonitorCall
,StartShufflerCall
,StopForgingCall
,StopFundingMonitorCall
,StopShufflerCall
,TrimDerivedTablesCall
,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 Description protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>
params
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description APICall
build()
JO
call()
T
chain(int chainId)
T
chain(java.lang.String chain)
byte[]
download()
BlockResponse
getBlock()
java.util.List<BlockResponse>
getBlocks()
TransactionResponse
getCreatedTransaction()
Use to parse responses of create transaction APIjava.util.List<TransactionResponse>
getCreatedTransactions()
Response from CreateTransaction calls wraps the transactions inside a transactionJSON objectjava.lang.String
getParam(java.lang.String key)
TransactionResponse
getTransaction()
Use to parse responses of APIs which return a transaction object like getTransactionjava.util.List<TransactionResponse>
getTransactions()
Use with any API which returns a "transactions" json arrayjava.util.List<TransactionResponse>
getTransactions(java.lang.String arrayName)
Use in case the response transaction array has a different nameboolean
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 value)
T
param(java.lang.String key, int... intArray)
T
param(java.lang.String key, long value)
T
param(java.lang.String key, long... longArray)
T
param(java.lang.String key, java.lang.String value)
T
param(java.lang.String key, java.lang.String[] values)
T
param(java.lang.String key, java.util.List<java.lang.String> values)
T
parts(java.lang.String key, byte[] b)
T
remote(java.net.URL url)
T
secretPhrase(java.lang.String value)
T
setParamValidation(boolean isEnabled)
T
trustRemoteCertificate(boolean trustRemoteCertificate)
T
unsignedLongParam(java.lang.String key, long value)
T
unsignedLongParam(java.lang.String key, long... longArray)
-
-
-
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)
-
chain
public T chain(java.lang.String chain)
-
chain
public T chain(int chainId)
-
getParam
public java.lang.String getParam(java.lang.String key)
-
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()
-
-