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

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

Link to this section Summary

Link to this section Functions

Link to this function

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

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 \\ [])

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 \\ [])

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}