voltra-hub-api-client
Version:
A Voltra Hub API Client
62 lines (44 loc) • 1.54 kB
Markdown
<p align="center">
<a href="https://github.com/xutyxd/voltra-hub-api-client"> <picture>
<source srcset="../voltra-hub-logo.png" width="150">
<img alt="TS Contract First logo" src="./voltra-hub-logo.png" width="150">
</picture>
</a>
</p>
<h1 align="center">
Client to interact with Voltra Hub API
</h1>
<p align="left">
<img src="https://img.shields.io/npm/dw/voltra-hub-api-client">
<img alt="NPM Unpacked Size" src="https://img.shields.io/npm/unpacked-size/voltra-hub-api-client">
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/voltra-hub-api-client">
<img alt="NPM Version" src="https://img.shields.io/npm/v/voltra-hub-api-client">
</p>
OpenAPI package for Voltra Hub API.
```js
const { VoltraHubAPIClient } = require('voltra-hub-api-client');
```
```js
import { VoltraHubAPIClient } from 'voltra-hub-api-client';
```
```ts
import { VoltraHubAPIClient } from 'voltra-hub-api-client';
```
```ts
import { VoltraHubAPIClient } from 'voltra-hub-api-client';
const client = new VoltraHubAPIClient('https://voltrahub.com/api');
// Check if the server is up
const healthCheck = await client.healthCheck();
console.log(healthCheck);
// Get PVPC for today
const pvpcToday = await client.pvpc.get(new Date());
console.log(pvpcToday);
```
This project is licensed under the `GNU AFFERO GENERAL PUBLIC LICENSE` - see the [LICENSE](LICENSE) file for details