ApiProvider

ApiProvider

API Service Provider for interacting with the blockchain via RESTful API.

Constructor

new ApiProvider(urlString, apiPrefix)

Source:
Configure the Api Service Provider.
Parameters:
Name Type Description
urlString string URL of the blockchain API. eg. http://api.n1.ecoc.io:port
apiPrefix string the prefix of the api server /api /insigh-api eg. http://api.n1.ecoc.io:port/ecoc-api the prefix is /ecoc-api

Methods

(async) Get(resource)

Source:
Executes a request to the blockchain via RESTful API request.
Parameters:
Name Type Description
resource string A resource object of RESTful API.