import { VizzlyApi, Authentication } from '@vizzly/api-client';
export const createParentDashboard = async () => {
const auth = new Authentication({projectApiKey: process.env['VIZZLY_PROJECT_API_KEY']});
const vizzlyApi = new VizzlyApi(auth);
const response = await vizzlyApi.createParentDashboard({
name: 'My new parent dashboard'
});
if(response.status === 200) {
const { dashboard } = response.body;
// dashboard.id
// dashboard.name
} else {
throw "Failed to create a parent dashboard.";
}
};
@vizzly/api-client
0.0.60 • Public • Published Readme
Keywords
nonePackage Sidebar
Install
npm i @vizzly/api-client
Weekly Downloads
2,729
Version
0.0.60
License
NONE
Unpacked Size
178 kB
Total Files
114