@eflyn/esuite-client
v6.24.1
Published
Standard API for communicating with Esuite Backend functionality.
Downloads
32
Maintainers
Readme
Eflyn API
This repository provides type definitions, an OpenAPI specification as well as a working client library (fully typed) for use with your MyEflyn Admin panel. You can find more details for authenticating with this API in your MyEflyn account.
| Resource | Description | |----------|--------------------------------------------------| | api.json | OpenAPI specification for the MyEflyn Admin API. | | dist/ | Generated type definitions and client library. |
Examples
// import the client helper
import { createEsuiteClient } from './esuite-client';
// instantiate the client
const myeflynAdmin = createEsuiteClient(/** here you can pass in auth params if applicable **/);
/**
* Fetch a list of your kiosks
*/
myeflynAdmin.kiosk.list()
.then(kiosks => {
console.log('Kiosk was last offline at: ', kiosk.offline);
});
/**
* Update a kiosk's RGB light color
*/
myeflynAdmin.kiosk.update(23, { rgbColor: ['green'] })
.then(() => {
console.log('Kiosk color changed successfully.');
});
/**
* Change the price of an item
*/
myeflynAdmin.catalogItemVariant.update(1213, { price: 23.87 })
.then((updatedItem) => {
console.log('Updated item status', updatedItem);
});