Calendar
Event
dataclass
Dataclass storing Event data
Attributes:
Name | Type | Description |
---|---|---|
title |
str
|
The title of the event |
description |
str
|
The description of the event |
location |
str
|
The location the event takes place |
full_day |
bool
|
Stores if the event is active the entire day |
date |
str
|
The date of a full-day event with the format |
start_time |
str
|
The start time of a non-full-day event with the format |
end_time |
str
|
The end time of a non-full-day event with the format |
date: str
class-attribute
The date of a full-day event with the format yyyy-MM-dd
end_time: str
class-attribute
The end time of a non-full-day event with the format yyyy-MM-ddTHH:mm:ss+01:00
start_time: str
class-attribute
The start time of a non-full-day event with the format yyyy-MM-ddTHH:mm:ss+01:00
create_event(event_info)
Creates Event in Google Calendar
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event_info |
Event
|
Information about the event that is created |
required |
get_all_events_today()
get_calendar_service()
Provides a Resource object to interact with the Google Calendar API
Returns:
Type | Description |
---|---|
Any
|
Resource for interacting with Google Calendar |
get_events_by_timeframe(min_timestamp, max_timestamp)
Provides all events inside timeframe
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_timestamp |
str
|
Lower timestamp in timeframe with format |
required |
max_timestamp |
str
|
Higher timestamp in timeframe with format |
required |
Returns:
Type | Description |
---|---|
list[Event]
|
List of all events inside timeframe |
get_next_event_today()
Provides the next event happening today
Returns:
Type | Description |
---|---|
Event | None
|
Next event happening today if one exists |