AccessGrid.CardTemplatePair (AccessGrid v0.1.0)

Copy Markdown View Source

Full representation of a template pair, as returned by AccessGrid.Console.read_template/2 when the resolved id belongs to a pair.

The same card-templates/:id endpoint serves both single templates and pairs; the server marks pairs with is_pair: true and embeds the full member templates under templates. For the lightweight list-view shape, see AccessGrid.CardTemplatePair.Summary.

Summary

Functions

Creates a CardTemplatePair struct from an API response map.

Types

t()

@type t() :: %AccessGrid.CardTemplatePair{
  id: String.t() | nil,
  name: String.t() | nil,
  templates: [AccessGrid.CardTemplate.t()]
}

Functions

from_response(data)

@spec from_response(map()) :: t()

Creates a CardTemplatePair struct from an API response map.