Table of Contents
outlook_calendar
OutlookCalendar Objects
class OutlookCalendar()
The class includes all necessary methods to access the Outlook calendar API endpoints
Arguments:
outlook_calendar_api
OutlookCalendarApi - Inject an Outlook calendar API model object that includes all necessary values and information
Attributes:
outlook_calendar_api
OutlookCalendarApi - This is where we store the outlook_calendar_apioutlook_graph_api_client
httpx.Client - This is where we store the outlook_graph_api_clientoutlook_graph_api_access_token
str - This is where we store the outlook_graph_api_access_token
get_events
def get_events(calendar_name: str, user_id: str) -> list
The method includes a functionality to get the events
Arguments:
calendar_name
str - Specify the calendar nameuser_id
str - Specify the user id
Raises:
ValueError
- Missed specifying a necessary valueConnectionError
- It is not possible to establish a connection to the endpoint
Returns:
events
list - Returns the corresponding calendar events
get_events_by_days
@staticmethod
def get_events_by_days(events: list, days: int) -> list
The method includes a functionality to get the weekly events
Arguments:
events
list - Specify the calendar eventsdays
- (int): Specify the control days
Raises:
ValueError
- Missed specifying a necessary valueBaseException
- Unspecified error by extracting the datetime information
Returns:
events_cw
list - Returns the corresponding weekly calendar events
get_weekly_events
def get_weekly_events(events: list) -> list
The method includes a functionality to get the weekly events
Arguments:
events
list - Specify the calendar events
Raises:
ValueError
- Missed specifying a necessary valueBaseException
- Unspecified error by extracting the datetime information
Returns:
events_cw
list - Returns the corresponding weekly calendar events