listCalendars
Lists the calendars the user can see.
Most users have more than one calendar, such as work, personal and a shared team calendar. listCalendars returns every one they can see, so you can let them pick.
import { listCalendars } from '@cal-sdk/core';
const { calendars } = await listCalendars({ calendar });Options
Only the common options.
Result
- calendarsCalendar[]
- Every calendar the user can see. Exactly one has
isPrimary: true. - warningsWarning[]
See Calendar for the fields of each calendar, and Calendars for what 'primary' means on each provider.
Throws
AuthenticationErrorwhen the credentials are rejected.