Exosphere.Community.App.ProfileLocalization (Exosphere v0.5.0)

Copy Markdown View Source

Localized metadata for a community.lexicon.app.profile record.

Record schema community.lexicon.app.profileLocalization.

Fields

  • created_at: Client-declared timestamp when this localization was created.
  • description: Localized description of what the app does.
  • images: Localized visual assets for directories and stores, such as icons, hero images, screenshots, banners, and social cards.
  • links: Localized destinations for the app. The first link should be the primary destination for this locale.
  • locale: BCP 47 language tag for this localized metadata.
  • name: Localized display name of the app.
  • tags: Localized discovery tags for filtering and search.
  • updated_at: Client-declared timestamp when this localization was last updated.

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.App.ProfileLocalization{
  created_at: String.t(),
  description: String.t() | nil,
  extra: term(),
  images: [Exosphere.Community.App.Defs.Image.t()] | nil,
  links: [Exosphere.Community.App.Defs.Link.t()] | nil,
  locale: String.t(),
  name: String.t() | nil,
  tags: [String.t()] | nil,
  updated_at: String.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.