@bueno-analytics/node-sdk
v0.5.0
Published
A Node.js package for interacting with the Bueno HTTP API.
Downloads
3
Readme
node-sdk
A Node.js package for interacting with the Bueno HTTP API.
🌏 Bueno Website | ⚙️ API Documentation (HTTP) | 📗 Changelog | 💳 License
Prerequisites
- Node.js >=18 <=22
Install
yarn add @bueno-analytics/node-sdk
npm install @bueno-analytics/node-sdk
Usage
// Import the API client
import { BuenoAPI } from '@bueno-analytics/node-sdk'
// Create a new instance of the client
const client = new BuenoAPI({
apiUrl: 'https://au.api.bueno-analytics.com'
})
// Request data!
const sites = await client.getSitesByOrganisationId('00000000-0000-0000-0000-000000000000')
console.log(sites)
Exports
There are several exports this package provides which may come in handy when working with our data model.
// root, the main API client
import { BuenoAPI } from '@bueno-analytics/node-sdk'
// lib, useful library functions
import { /* */ } from '@bueno-analytics/node-sdk/lib'
// types, publicly available types for our data model
import { /* */ } from '@bueno-analytics/node-sdk/types'
Documentation & TypeScript
@bueno-analytics/node-sdk
ships with TypeScript types built-in to every available method, links to the relevant API documentation, and descriptions of each method via JSDoc.