Nostr. Event. CurationSets
(Nostr Lib v0.2.1)
(event)
(nip51)
View Source
Curation Sets (Kinds 30004, 30005, 30006)
Groups of content picked by users as interesting and/or belonging to the
same category. These are addressable events with a d tag identifier.
Kinds
- 30004: Article curation -
atags for kind:30023,etags for kind:1 - 30005: Video curation -
etags for kind:21 videos - 30006: Picture curation -
etags for kind:20 pictures
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 article curation set (kind 30004).
Creates a new picture curation set (kind 30006).
Creates a new video curation set (kind 30005).
Parses a curation set event (kind 30004, 30005, or 30006).
Types
Functions
Creates a new article curation set (kind 30004).
Arguments
identifier- Unique identifier for this setitems- Map with:articles(a tags) and/or:notes(e tags)opts- Optional metadata and event arguments
Example
CurationSets.create_articles("yaks", %{
articles: ["30023:pubkey:yak-article"],
notes: ["note_about_yaks_id"]
},
title: "Yaks",
description: "Everything about yaks"
)
Creates a new picture curation set (kind 30006).
Arguments
identifier- Unique identifier for this setpicture_ids- List of kind:20 picture event IDsopts- Optional metadata and event arguments
Example
CurationSets.create_pictures("landscapes", ["pic1", "pic2"],
title: "Beautiful Landscapes"
)
Creates a new video curation set (kind 30005).
Arguments
identifier- Unique identifier for this setvideo_ids- List of kind:21 video event IDsopts- Optional metadata and event arguments
Example
CurationSets.create_videos("tutorials", ["video1", "video2"],
title: "Tutorial Videos"
)
@spec parse(Nostr.Event.t()) :: t()
Parses a curation set event (kind 30004, 30005, or 30006).