@vizzly/api-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.60 • Public • Published

Vizzly API client

Create a parent dashboard

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.";
  }
};

Readme

Keywords

none

Package Sidebar

Install

npm i @vizzly/api-client

Weekly Downloads

2,729

Version

0.0.60

License

NONE

Unpacked Size

178 kB

Total Files

114

Last publish

Collaborators

  • jamesbowers
  • brandon.bell