google_calendar v0.2.0 GoogleCalendar.CalendarList
Interact with google calendar list
Differences between Calendar
and CalendarList
:
Calendar contains calendar specific data (such as timezone, name). You should call insert on Calendar
when creating a new calendar
CalendarList is a collection of all calendar entries and contain more general information of each calendar, which shows distinction among them such as color, access roles.
When you create a new calendar through calendars collection, it will be automatically added to your list
Check list of options in https://developers.google.com/google-apps/calendar/v3/reference/calendarList
# Access client which contains token from session if you have put it into session previously
client = get_session(conn, "client")
# Config your calenar variable. Calendar is [`Map`](https://hexdocs.pm/elixir/Map.html)/ `Nested Map` type
calendar = %{id: "YOUR CALENDAR ID"}
# Additional calendar information are included in event if you want to insert, update, or path
calendar = %{
id: "YOUR CALENDAR ID",
defaultReminders: %{
method: "YOUR METHOD"
}
}
# Add query parameter to opts.Opts is [`Keyword`](https://hexdocs.pm/elixir/Keyword.html) type
opts = [params: [showDeleted: true]]
GoogleCalendar.Calendar.get(client, event, opts)
# Return result will be either `{:ok, action, result}` or `{:error, code, error_message}`
Link to this section Summary
Functions
Function!/n
is similar to Function/n
but raises error if an error occurs during the request
Link to this section Functions
Link to this function
delete(client, calendar, opts \\ [], headers \\ [])
Link to this function
delete!(client, calendar, opts \\ [], headers \\ [])
Link to this function
get(client, calendar, opts \\ [], headers \\ [])
Link to this function
get!(client, calendar, opts \\ [], headers \\ [])
Link to this function
insert(client, calendar, opts \\ [], headers \\ [])
Link to this function
insert!(client, calendar, opts \\ [], headers \\ [])
Link to this function
list(client, opts \\ [], headers \\ [])
Function!/n
is similar to Function/n
but raises error if an error occurs during the request
Link to this function
list!(client, opts \\ [], headers \\ [])
Link to this function
patch(client, calendar, opts \\ [], headers \\ [])
Link to this function
patch!(client, calendar, opts \\ [], headers \\ [])
Link to this function
update(client, calendar, opts \\ [], headers \\ [])
Link to this function
update!(client, calendar, opts \\ [], headers \\ [])