helium_api_client

Last updated:

0 purchases

helium_api_client Image
helium_api_client Images
Add to Cart

Description:

helium api client

Helium API Client Library for Dart #
Provides a client for the Helium API in the Dart language.
Currently, it supports 3 sections of the Blockchain API: Hotspots,
Oracle Prices, and Transactions.
Usage #
Get a client instance:
final client = HeliumBlockchainClient();
copied to clipboard
You can make API calls on the methods of:

client.hotspots
client.prices
client.transactions

API calls return a HeliumResponse object. You can get the results
from the data property on the response.
final client = HeliumBlockchainClient();
var resp = await client.prices.getCurrent();
print(resp.data.price);
copied to clipboard
If the API is paged, it returns a HeliumPagedResponse. To get the
next page of results (also a HeliumPagedResponse object), call
getNextPage passing the previous page response:
final client = HeliumBlockchainClient();
var resp = await client.prices.getCurrentAndHistoric();
print(resp.data.length);
resp = await client.getNextPage(resp);
print(resp.data.length);
resp = await client.getNextPage(resp);
print(resp.data.length);
// ...
copied to clipboard
There is no need to close or destroy any objects when done.
Features and bugs #
Please file feature requests and bugs at the issue tracker.
Contributing to this library #
Run tests (does code generation) #
dart run build_runner test
copied to clipboard
Generate Code #
dart run build_runner build
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.