@hg8496/gridvis-client
Version:
A library to access all GridVis data
28 lines (22 loc) • 1.03 kB
Markdown
# gridvis-client
[](https://www.npmjs.com/package/@hg8496/gridvis-client)
[](https://travis-ci.org/hg8496/gridvis-client)
[](https://coveralls.io/github/hg8496/gridvis-client?branch=master)
A node js library to access the Janitza GridVis REST interface.
```typescript
import { GridVisClient } from '@hg8496/gridvis-client';
async function main() {
const client = new GridVisClient({url: ""});
return await client.fetchGridVisVersion();
}
main().then((version) => {
console.log(version)
});
```
## CLI
A cli is also included. To obtain some information or statistics.
To see statistic of last months events for a given device call:
```bash
$ gridvis-client events https://gridvis-energy.com DemoProject 92 -s NAMED_LastYear -e NAMED_LastYear
VoltageUnder: 7
```