0.2.1 • Published 4 years ago
solaredge-vpp-api v0.2.1
solaredge-vpp-api
General purpose promise-based module for interfacing with the SolarEdge VPP API.
Installation
$ npm install @sunrun/solaredge-vpp-api
or
$ yarn add @sunrun/solaredge-vpp-api
Usage
const SolarEdgeVppApi = require('@sunrun/solaredge-vpp-api');
const logger = require('@sunrun/structured-logging').createModuleLogger(module);
const username = 'user';
const password = 'pass';
const endpointUrl = 'https://url.com';
const solarEdgeVppApi = new SolarEdgeVppApi({ username, password, endpointUrl, logger });
solarEdgeVppApi.getResource()
.then((results) => {
console.log(results);
})
.catch((err) => {
console.log(err);
});
API
Please see api.md
for more information about usage