API Reference
ICSHandler
API reference for the ICSHandler class.
import { ICSHandler } from '@forcecalendar/core';
new ICSHandler(calendar: Calendar)
| Method | Signature | Returns |
|---|
import | (input: string | File, options?: ImportOptions) => Promise<ImportResult> | Import result |
export | (options?: ExportOptions) => Promise<string> | ICS string |
downloadAsFile | (filename?: string, options?: ExportOptions) => Promise<void> | — |
importFromURL | (url: string, options?: ImportOptions) => Promise<ImportResult> | Import result |
subscribe | (url: string, options?: SubscribeOptions) => Subscription | Subscription |
validate | (icsString: string) => ValidationResult | Validation result |
| Option | Type | Default |
|---|
merge | boolean | true |
updateExisting | boolean | false |
skipDuplicates | boolean | true |
dateRange | { start: Date, end: Date } | undefined |
categories | string[] | [] |
| Option | Type | Default |
|---|
dateRange | { start: Date, end: Date } | undefined |
categories | string[] | [] |
calendarName | string | 'Calendar' |
includeRecurring | boolean | true |
expandRecurring | boolean | false |
| Method | Description |
|---|
refresh() | Force immediate refresh |
stop() | Pause auto-refresh |
start() | Resume auto-refresh |
{ valid: boolean, errors: string[], eventCount: number }