Skip to content

pliancy/timelyapp-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ccd843e · Mar 8, 2024

History

90 Commits
Mar 8, 2024
Aug 30, 2021
Jun 29, 2021
Aug 25, 2023
Feb 7, 2021
May 12, 2021
Feb 8, 2021
Jun 29, 2021
Aug 30, 2021
Feb 8, 2021
May 18, 2021
Aug 30, 2021
Mar 8, 2024
Aug 30, 2021
Aug 30, 2021
Mar 8, 2024

Repository files navigation

TimelyApp Node SDK

Timely Rest API GitHub Workflow Status npm Downloads Dependency Status License

A typed node module which provides a wrapper and several convienence functions for the TimelyApp.com API

Installation

npm install timelyapp

Examples

import { TimelyApp } from 'timelyapp'
import dotenv from 'dotenv'
dotenv.config()

const timely = new TimelyApp({
    accountId: process.env.TIMELY_ACCOUNT as string,
    token: process.env.TIMELY_TOKEN as string,
})

;(async () => {
    const output = await timely.getClients()
    // eslint-disable-next-line no-console
    console.dir(output, { depth: null })
    // eslint-disable-next-line no-console
})().catch(console.log)

Create the client

import { TimelyApp } from 'timelyapp'

const timely = new TimelyApp({
  clientId: 'xxxxxxxxxxxxx',
  clientSecret: 'xxxxxxxxxxxxx',
  accountId: '123456',
})

Get all users

const users = await timely.users.getAll()