Exosphere.Community.Calendar.Event (Exosphere v0.6.0)

Copy Markdown View Source

Record schema community.lexicon.calendar.event.

Fields

  • created_at: Client-declared timestamp when the event was created.
  • description: The description of the event.
  • ends_at: Client-declared timestamp when the event ends.
  • locations: The locations where the event takes place.
  • mode: ref community.lexicon.calendar.event#mode
  • name: The name of the event.
  • rsvp_expected: Whether a response is requested from attendees.
  • starts_at: Client-declared timestamp when the event starts.
  • status: ref community.lexicon.calendar.event#status
  • uris: URIs associated with the event.

Summary

Functions

Decode a wire-format map. Delegates to new/1.

Build and validate from a map of attrs (atom or wire string keys).

Build and validate, raising ArgumentError on error.

Encode to the wire-format map. Record schemas include "$type".

The lexicon type ID (nsid or nsid#def) this module was generated from.

Types

t()

@type t() :: %Exosphere.Community.Calendar.Event{
  created_at: String.t(),
  description: String.t() | nil,
  ends_at: String.t() | nil,
  extra: term(),
  locations:
    [
      Exosphere.Community.Calendar.Event.Uri.t()
      | Exosphere.Community.Location.Address.t()
      | Exosphere.Community.Location.Fsq.t()
      | Exosphere.Community.Location.Geo.t()
      | Exosphere.Community.Location.Hthree.t()
      | map()
    ]
    | nil,
  mode: term() | nil,
  name: String.t(),
  rsvp_expected: boolean() | nil,
  starts_at: String.t() | nil,
  status: term() | nil,
  uris: [Exosphere.Community.Calendar.Event.Uri.t()] | nil
}

Functions

from_map(map)

@spec from_map(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Decode a wire-format map. Delegates to new/1.

new(attrs)

@spec new(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Build and validate from a map of attrs (atom or wire string keys).

Unknown keys are kept in extra and re-emitted by to_map/1.

new!(attrs)

@spec new!(map()) :: t()

Build and validate, raising ArgumentError on error.

to_map(struct)

@spec to_map(t()) :: map()

Encode to the wire-format map. Record schemas include "$type".

type_id()

@spec type_id() :: String.t()

The lexicon type ID (nsid or nsid#def) this module was generated from.