Skip to content

O365Calendar

flowtask.interfaces.O365Calendar

OutlookCalendarClient

OutlookCalendarClient(*args, **kwargs)

Bases: O365Client

Outlook Calendar Client for managing calendar events through Microsoft Graph API.

create_event async

create_event(calendar_id, event)

Create an event in the specified Outlook calendar.

Parameters:

Name Type Description Default
calendar_id str

The ID of the calendar.

required
event dict

The event details.

required

Returns:

Name Type Description
dict Dict

Details of the created event.

delete_event async

delete_event(calendar_id, event_id)

Delete an event from the specified calendar.

Parameters:

Name Type Description Default
calendar_id str

The ID of the calendar.

required
event_id str

The ID of the event to delete.

required

get_client async

get_client()

Ensure that the Graph client is initialized and ready to use.

get_event async

get_event(calendar_id, event_id)

Retrieve details of a specific event.

Parameters:

Name Type Description Default
calendar_id str

The ID of the calendar.

required
event_id str

The ID of the event.

required

Returns:

Name Type Description
dict Dict

Details of the retrieved event.

list_events async

list_events(calendar_id, start_datetime, end_datetime, max_results=10)

List events in a specified time range in the specified calendar.

Parameters:

Name Type Description Default
calendar_id str

The ID of the calendar.

required
start_datetime datetime

Start time for retrieving events.

required
end_datetime datetime

End time for retrieving events.

required
max_results int

Maximum number of events to retrieve (default: 10).

10

Returns:

Name Type Description
list List[Dict]

List of events in the specified time range.

update_event async

update_event(calendar_id, event_id, updated_event)

Update an existing event in the specified calendar.

Parameters:

Name Type Description Default
calendar_id str

The ID of the calendar.

required
event_id str

The ID of the event.

required
updated_event dict

Updated event details.

required

Returns:

Name Type Description
dict Dict

Details of the updated event.