The BalenaSDK class contains an instance of the balena sdk, as well as some helper methods to interact with a device via the cloud. The balena attribute of the class contains the sdk,and can be used as follows in a test suite:
BalenaSDK
balena
const Cloud = this.require("components/balena/sdk"); this.suite.context.set({ cloud: new Balena("https://api.balena-cloud.com/", this.getLogger()) }); // login await this.context .get() .cloud.balena.auth.loginWithToken(this.suite.options.balena.apiKey); // create a balena application await this.context.get().cloud.balena.models.application.create({ name: `NAME`, deviceType: `DEVICE_TYPE`, organization: `ORG`, });
Generated using TypeDoc
balenaSDK helpers
The
BalenaSDK
class contains an instance of the balena sdk, as well as some helper methods to interact with a device via the cloud. Thebalena
attribute of the class contains the sdk,and can be used as follows in a test suite: