Nostr.Event.MediaStarterPacks (Nostr Lib v0.2.1) (event) (nip51)

View Source

Media Starter Packs (Kind 39092)

Same as Starter Packs (kind 39089), but specific to multimedia (photos, short video) clients. This is an addressable event with a d tag identifier.

Sets can have optional metadata: title, image, and description.

Defined in NIP 51 https://github.com/nostr-protocol/nips/blob/master/51.md

Summary

Functions

Creates a new media starter pack (kind 39092).

Parses a kind 39092 event into a MediaStarterPacks struct.

Types

t()

@type t() :: %Nostr.Event.MediaStarterPacks{
  description: binary() | nil,
  event: Nostr.Event.t(),
  identifier: binary(),
  image: binary() | nil,
  pubkeys: [binary()],
  title: binary() | nil
}

Functions

create(identifier, pubkeys, opts \\ [])

@spec create(binary(), [binary()], Keyword.t()) :: t()

Creates a new media starter pack (kind 39092).

Arguments

  • identifier - Unique identifier for this starter pack
  • pubkeys - List of pubkeys to include in the pack
  • opts - Optional event arguments and set metadata

Options

  • :title - Starter pack title for display
  • :image - Starter pack image URL
  • :description - Starter pack description
  • :pubkey - Event author pubkey
  • :created_at - Event timestamp

Example

MediaStarterPacks.create("photographers", [
  "pubkey1",
  "pubkey2"
],
  title: "Top Photographers",
  description: "Amazing photography accounts to follow"
)

parse(event)

@spec parse(Nostr.Event.t()) :: t()

Parses a kind 39092 event into a MediaStarterPacks struct.