Skip to content

overbooked-io/overbooked-js

Repository files navigation

Overbooked Javascript/Node.js SDK

Build

The Overbooked Javascript/Node.js SDK provides convenient access to Overbooked API from application written in client-side Javascript and server-side Node.js.

Documentation

See the API Reference

Requirements

Node 10 or higher.

Installation

Install the package with:

npm install @overbooked/overbooked-js

or

yarn add @overbooked/overbooked-js

Usage

The Client needs to be configured with publicKey or secretKey, which are available in the Overbooked Dashboard in Settings -> Environments section.

Javascript

import { Overbooked } from "@overbooked/overbooked-js";

const overbooked = new Overbooked.Client({
  publicKey: 'pk_xxxxxxx'
})

const { data, meta, error, success } = await overbooked.resource.list({
  page: 1,
  limit: 50,
})

Node.js

const { Overbooked } = require("@overbooked/overbooked-js");

const overbooked = new Overbooked.Client({
  secretKey: 'sk_xxxxxxx'
})

const { data, meta, error, success } = await overbooked.resource.list({
  page: 1,
  limit: 50,
})