// example/basic/index.js
const SDK = require("@zesty-io/sdk");
// !!! Do not commit your password to a repository. This needs to stay secret.
// We only have you enter it here for simplicity of the example.
// Add your user email, password and instance ZUID
const ZESTY_USER_EMAIL = "";
const ZESTY_USER_PASSWORD = "";
const ZESTY_INSTANCE_ZUID = "";
// Get authenticated session
const auth = new SDK.Auth();
const session = await auth.login(ZESTY_USER_EMAIL, ZESTY_USER_PASSWORD);
// Instantiate sdk instance with instance ZUID and authenticated session token
const sdk = new SDK(ZESTY_INSTANCE_ZUID, session.token);
const res = await sdk.instance.getModels();
// View our response data in the console