A reminder attached to an object (RFC 8984 ยง4.5.2).
The trigger is one of JSCalendar.OffsetTrigger,
JSCalendar.AbsoluteTrigger, or โ for a kind this library does not
know โ the raw map. RFC 8984 requires an unrecognised trigger to be
preserved rather than dropped, since the alert still belongs to the
object even if this implementation cannot fire it.
Summary
Functions
Read this object from a decoded JSON map.
The @type value RFC 8984 gives this object.
Write this object back to a JSON-ready map.
Types
@type t() :: %JSCalendar.Alert{ acknowledged: DateTime.t() | nil, action: String.t(), extra: map(), related_to: term(), trigger: JSCalendar.OffsetTrigger.t() | JSCalendar.AbsoluteTrigger.t() | map() | nil }
Functions
Read this object from a decoded JSON map.
Arguments
mapis a map with string keys, as:json.decode/1returns.
Returns
{:ok, object}; or{:error, reason}when a property does not match its declared type.
@spec jscalendar_type() :: String.t()
The @type value RFC 8984 gives this object.
Returns
- the type name as a string.
Write this object back to a JSON-ready map.
Arguments
objectis at/0.
Returns
- a map with string keys, ready for
:json.encode/1.