Exosphere.Bsky.Feed.Threadgate (Exosphere v0.6.0)

Copy Markdown View Source

Record schema app.bsky.feed.threadgate.

Fields

  • allow: List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.
  • created_at: string, format datetime
  • hidden_replies: List of hidden reply URIs.
  • post: Reference (AT-URI) to the post record.

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.Bsky.Feed.Threadgate{
  allow:
    [
      Exosphere.Bsky.Feed.Threadgate.MentionRule.t()
      | Exosphere.Bsky.Feed.Threadgate.FollowerRule.t()
      | Exosphere.Bsky.Feed.Threadgate.FollowingRule.t()
      | Exosphere.Bsky.Feed.Threadgate.ListRule.t()
      | map()
    ]
    | nil,
  created_at: String.t(),
  extra: term(),
  hidden_replies: [String.t()] | nil,
  post: String.t()
}

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.