Skip to content

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_api
  • outlook_graph_api_client httpx.Client - This is where we store the outlook_graph_api_client
  • outlook_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 name
  • user_id str - Specify the user id

Raises:

  • ValueError - Missed specifying a necessary value
  • ConnectionError - 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 events
  • days - (int): Specify the control days

Raises:

  • ValueError - Missed specifying a necessary value
  • BaseException - 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 value
  • BaseException - Unspecified error by extracting the datetime information

Returns:

  • events_cw list - Returns the corresponding weekly calendar events