Skip to content

saw-jan/teamup-client

Repository files navigation

Teamup Calendar Client

A library for working with Teamup calendar.

Installation

npm i @sawjan/teamup-client

Usage

const TeamupClient = require('@sawjan/teamup-client')

const client = new TeamupClient({
  url: 'https://api.teamup.com',
  calendarKey: '<calendar-key>',
  teamupToken: '<teamup-token>',
  bearerToken: '<bearer-token>',
})

Examples

See example code: examples

APIs

Event

  • .getEvents([options])

    For available options see Query Parameters

  • .getAllDayEvents([options])

  • .getRecurringEvents([options])

  • .getEvent(eventId)

SubCalendar

  • .getSubCalendars([options])

    For available options see Query Parameters

  • .getInactiveSubCalendars([options])

  • .getSubCalendar(subCalendarId):

  • .getSubCalendarByName(subCalendarName)

All APIs will either return Promise<SuccessResponse> or throw Promise<ErrorResponse>

Structs

SuccessResponse

{
  status: <number>,
  statusText: <string>,
  data: <array>|<object>
}

ErrorResponse

{
  status: <number>,
  statusText: <string>,
  error: <object>
}