@xompass/sdk-cloud-api
v1.6.0
Published
Xompass Client for cloud-api
Downloads
2,962
Readme
Xompass CloudApi SDK
Usage
npm install @xompass/sdk-cloud-api
Sample Code
const sdk = require('@xompass/sdk-cloud-api');
sdk.XompassClient.setBaseURL('https://api.xompass.com');
sdk.XompassClient.setStorage(new sdk.MemoryStorage());
sdk.XompassClient.setDebugMode(false);
main()
async function main() {
await sdk.AdminApi.login({username: '<my_username>', password: '<my_password>'});
const assets = await sdk.CustomerApi.getAssets('<customerId>', { // A loopback filter
fields: ['id', 'name'],
limit: 10,
where: {type: 'ObjectRecognitionCam'},
include: {
relation: 'sensors',
scope: {fields: ['id', 'name']}
}
})
//...
}
For more information about loopback filters go to official page of Loopback