Exosphere.Community.App.Profile (Exosphere v0.6.0)

Copy Markdown View Source

Record schema community.lexicon.app.profile.

Fields

  • account_indicators: Records whose presence in an account can indicate that the account probably uses this app.
  • created_at: Client-declared timestamp when this profile was created.
  • description: A short description of what the app does.
  • images: Visual assets for directories and stores, such as icons, hero images, screenshots, banners, and social cards.
  • lexicons: ref community.lexicon.app.defs#lexiconInterop
  • links: Relevant destinations for the app. The first link should be the primary destination.
  • name: The display name of the app.
  • platforms: Platforms where this app is available.
  • status: ref community.lexicon.app.defs#status
  • tags: Open discovery tags for filtering and search, preferably lowercase. Do not use tags for platforms or lexicon interoperability.
  • updated_at: Client-declared timestamp when this profile 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.Profile{
  account_indicators: [Exosphere.Community.App.Defs.AccountIndicator.t()] | nil,
  created_at: String.t(),
  description: String.t() | nil,
  extra: term(),
  images: [Exosphere.Community.App.Defs.Image.t()] | nil,
  lexicons: Exosphere.Community.App.Defs.LexiconInterop.t() | nil,
  links: [Exosphere.Community.App.Defs.Link.t()],
  name: String.t(),
  platforms: [term()] | nil,
  status: term() | 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.