View Source Excalt.Event (Excalt v0.1.2)

Fetches events from the caldav server, modifies events, and deletes events.

Link to this section Summary

Functions

Creates a new event item with the given icalendar text.

Deletes an event with the given uuid.

Updates a single event, given an uid of the event, the new version, and the etag. Will throw an error, if the etag has changed in the meantime. (see RFC 4791, section 7.8.1).

Returns the parsed xml of the calendars for a user from the CalDav server.

Returns the parsed xml of the calendars for a user from the CalDav server.

Fetches the raw xml of the events for a user from the CalDav server.

Fetches the raw xml of the events for a user and a time duration from the CalDav server.

Returns the parsed list of events for a period of time, where also the icalendar parts are parsed.

Updates a single event, given an uid of the event, the new version, and the etag. Will throw an error, if the etag has changed in the meantime. (see RFC 4791, section 7.8.1).

Link to this section Types

@type t() :: %Excalt.Event{etag: String.t(), icalendar: String.t(), url: String.t()}

Link to this section Functions

Link to this function

create(server_url, username, password, calendar_name, ical_text, uuid)

View Source
@spec create(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  ical_text :: String.t(),
  uuid :: String.t()
) :: {:ok, etag :: String.t() | nil} | {:error, any()}

Creates a new event item with the given icalendar text.

Link to this function

delete(server_url, username, password, calendar_name, uuid)

View Source
@spec delete(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  uuid :: String.t()
) :: {:ok, etag :: String.t() | nil} | {:error, any()}

Deletes an event with the given uuid.

Link to this function

get(server_url, username, password, calendar_name, uuid, opts \\ [])

View Source
@spec get(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  uuid :: String.t(),
  opts :: keyword()
) :: {:ok, [t()]} | {:error, any()}

Updates a single event, given an uid of the event, the new version, and the etag. Will throw an error, if the etag has changed in the meantime. (see RFC 4791, section 7.8.1).

Link to this function

list!(server_url, username, password, calendar_name)

View Source
@spec list!(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t()
) :: [t()]

Returns the parsed xml of the calendars for a user from the CalDav server.

Link to this function

list!(server_url, username, password, calendar_name, from, to)

View Source
@spec list!(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  from :: DateTime.t(),
  to :: DateTime.t()
) :: [t()]

Returns the parsed xml of the calendars for a user from the CalDav server.

Link to this function

list_raw(server_url, username, password, calendar_name)

View Source
@spec list_raw(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t()
) :: {:ok, xml :: String.t()} | {:error, any()}

Fetches the raw xml of the events for a user from the CalDav server.

Link to this function

list_raw(server_url, username, password, calendar_name, from, to)

View Source
@spec list_raw(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  from :: DateTime.t(),
  to :: DateTime.t()
) :: {:ok, xml :: String.t()} | {:error, any()}

Fetches the raw xml of the events for a user and a time duration from the CalDav server.

Link to this function

parsed_list!(server_url, username, password, calendar_name, from, to)

View Source
@spec parsed_list!(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  from :: DateTime.t(),
  to :: DateTime.t()
) :: [t()]

Returns the parsed list of events for a period of time, where also the icalendar parts are parsed.

Link to this function

update(server_url, username, password, calendar_name, uuid, ical_text, etag, opts \\ [])

View Source
@spec update(
  server_url :: String.t(),
  username :: String.t(),
  password :: String.t(),
  calendar_name :: String.t(),
  uuid :: String.t(),
  ical_text :: String.t(),
  etag :: String.t(),
  opts :: keyword()
) :: {:ok, [t()]} | {:error, any()}

Updates a single event, given an uid of the event, the new version, and the etag. Will throw an error, if the etag has changed in the meantime. (see RFC 4791, section 7.8.1).