google_calendar v0.2.0 GoogleCalendar.Calendar
Interact with google calendars
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/calendars
# 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.Event.get(client, event, opts)
# Return result will be either `{:ok, action, result}` or `{:error, code, error_message}`
Link to this section Summary
Functions
Only clear the primary calendar of an account
Function!/n
is similar to Function/n
but raises error if an error occurs during the request
Link to this section Functions
Only clear the primary calendar of an account
Function!/n
is similar to Function/n
but raises error if an error occurs during the request