MicrosoftGraph.Users.Calendar (Microsoft Graph API Client v0.2.0)

https://docs.microsoft.com/en-us/graph/api/resources/calendar?view=graph-rest-1.0

Link to this section Summary

Functions

Removes the specified event from the containing calendar.

Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters.

Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period.

Create an event in the user's default calendar or specified calendar.

Update the properties of the event object.

Link to this section Functions

Link to this function

delete_meeting(client, id, meeting_id, options \\ [])

Removes the specified event from the containing calendar.

https://learn.microsoft.com/en-us/graph/api/event-delete?view=graph-rest-1.0&tabs=http

examples

Examples

# Params are NOT required for this endpoint

iex> MicrosoftGraph.Users.Calendar.delete_meeting(client, "user_id", "meeting_id")
{:ok, response}
Link to this function

find_meeting_times(client, id, options \\ [])

Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters.

https://learn.microsoft.com/en-us/graph/api/user-findmeetingtimes?view=graph-rest-1.0&tabs=http

examples

Examples

# Params are required for this endpoint
iex> MicrosoftGraph.Users.Calendar.find_meeting_times(client, "user_id")
{:error, response}

iex> MicrosoftGraph.Users.Calendar.find_meeting_times(client, "user_id", params: %{
  "attendees": [
        %{
            "emailAddress": %{
                "address": "{user-mail}",
                "name": "Alex Darrow"
            },
            "type": "Required"
        }
    ],
    "timeConstraint": %{
        "timeslots": [
            %{
                "start": %{
                    "dateTime": "2022-11-02T23:35:18.469Z",
                    "timeZone": "Pacific Standard Time"
                },
                "end": %{
                    "dateTime": "2022-11-09T23:35:18.469Z",
                    "timeZone": "Pacific Standard Time"
                }
            }
        ]
    },
    "locationConstraint": %{
        "isRequired": "false",
        "suggestLocation": "true",
        "locations": [
            %{
                "displayName": "Conf Room 32/1368",
                "locationEmailAddress": "conf32room1368@imgeek.onmicrosoft.com"
            }
        ]
    },
    "meetingDuration": "PT1H"
})
{:ok, response}
Link to this function

get_schedule(client, id, options \\ [])

Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period.

https://docs.microsoft.com/en-us/graph/api/calendar-getschedule?view=graph-rest-1.0&tabs=http

examples

Examples

# Params are required for this endpoint
iex> MicrosoftGraph.Users.Calendar.get_schedule(client, "user_id")
{:error, response}

iex> MicrosoftGraph.Users.Calendar.get_schedule(client, "user_id", params: %{
  schedules: ["user_email"],
  startTime: %{
    dateTime: NaiveDateTime.utc_now(),
    timeZone: "UTC"
  },
  endTime: %{
    dateTime: NaiveDateTime.utc_now() |> NaiveDateTime.add(3600, :second),
    timeZone: "UTC"
  },
  availabilityViewInterval: 15
})
{:ok, response}
Link to this function

schedule_meeting(client, id, options \\ [])

Create an event in the user's default calendar or specified calendar.

https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http

examples

Examples

# Params are required for this endpoint
iex> MicrosoftGraph.Users.Calendar.schedule_meeting(client, "user_id")
{:error, response}

iex> MicrosoftGraph.Users.Calendar.schedule_meeting(client, "user_id", params: %{
  "subject": "Let's go for lunch",
  "body": %{
    "contentType": "HTML",
    "content": "Does noon work for you?"
  },
  "start": %{
      "dateTime": "2017-04-15T12:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": %{
      "dateTime": "2017-04-15T14:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location": %{
      "displayName":"Harry's Bar"
  },
  "attendees": [
    %{
      "emailAddress": %{
        "address":"samanthab@contoso.onmicrosoft.com",
        "name": "Samantha Booth"
      },
      "type": "required"
    }
  ],
  "allowNewTimeProposals": true
})
{:ok, response}
Link to this function

update_meeting(client, id, meeting_id, options \\ [])

Update the properties of the event object.

https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http

examples

Examples

# Params are required for this endpoint
iex> MicrosoftGraph.Users.Calendar.update_meeting(client, "user_id", "meeting_id")
{:error, response}

iex> MicrosoftGraph.Users.Calendar.update_meeting(client, "user_id", , "meeting_id", params: %{
  "body": %{
    "contentType": "HTML",
    "content": "Does noon work for you??"
  }
})
{:ok, response}