@balena/jellyfish-plugin-balena-api
v6.8.7
Published
Balena API Jellyfish Plugin
Downloads
1,657
Readme
Jellyfish Balena API Plugin
Provides a sync integration for Balena API.
Usage
Below is an example how to use this library:
import { balenaApiPlugin } from '@balena/jellyfish-plugin-balena-api';
import { PluginManager } from '@balena/jellyfish-worker';
// Load contracts from this plugin
const pluginManager = new PluginManager([balenaApiPlugin()]);
const contracts = pluginManager.getCards();
console.dir(contracts);
Documentation
Visit the website for complete documentation: https://product-os.github.io/jellyfish-plugin-balena-api
Testing
Unit tests can be easily run with the command npm test
.
You can run integration tests locally against Postgres and Redis instances running in docker-compose
:
npm run compose
REDIS_HOST=localhost POSTGRES_HOST=localhost npm run test:integration
You can also access these Postgres and Redis instances:
PGPASSWORD=docker psql -hlocalhost -Udocker
redis-cli -h localhost