@flyo/nitro-js
v1.1.5
Published
Flyo Nitro JS SDK
Downloads
3
Readme
Flyo Nitro JavaScript SDK
yarn add @flyo/nitro-js
Getting Started
Please follow the installation instruction and execute the following JS code:
import { ApiClient, ConfigApi, PagesApi } from '@flyo/nitro-js'
var defaultClient = ApiClient.instance;
defaultClient.defaultHeaders = {}
let ApiToken = defaultClient.authentications['ApiToken'];
ApiToken.apiKey = 'YOUR API KEY';
// the config data contains all informations, including all pages to retrieve further informations like page content:
const configData = await new ConfigApi().config()
// retrieve a the content for home page
const homeData = await new PagesApi().home()
// trieve information by a certain slug
const pageData = await new PagesApi().page({slug: 'the/slug/of/the/page'})