Skip to main content
Google Calendar is a scheduling and time-management service that allows users to create, manage, and share events. It provides features like reminders, recurring events, and integration with other Google Workspace services. With the CalenderHandler, you can connect to Google Calendar via OAuth 2.0 and programmatically fetch events for a day, week, month, or specific type.

Example

To create the CalenderHandler object, initialize it with your Google OAuth credentials file. The handler manages authentication and provides methods to retrieve events from Google Calendar.
Get Today’s Events:
Retrieves all events scheduled for today.
Get Week Events:
Retrieves all events scheduled for the next 7 days.
Get Month Events:
Retrieves all events scheduled for the next 30 days.
Get Events by Custom Days:
Fetches events for a custom range between 1 and 30 days.
Get Events by Type:
Fetches events of a specific type such as “birthday”, “focusTime”, or “workingLocation”.