Package nxt.http

Class APICall.Builder<T extends APICall.Builder>

    • 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)
      • 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)
      • 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