scruffy/tag

A type describing Scryfall’s Tag object, used to group cards or illustrations by community-curated Oracle and illustration tags.

See https://scryfall.com/docs/api/tags for the upstream reference.

Types

A tag that can be applied to cards or illustrations.

pub type Tag {
  Tag(
    id: String,
    slug: String,
    label: String,
    uri: uri.Uri,
    tag_type: TagType,
    description: option.Option(String),
    parent_ids: option.Option(List(String)),
    child_ids: option.Option(List(String)),
    aliases: option.Option(List(String)),
    taggings: List(Tagging),
  )
}

Constructors

Whether a tag applies to a card’s Oracle text or its illustration.

pub type TagType {
  Illustration
  Oracle
}

Constructors

  • Illustration
  • Oracle

An application of a Tag to a specific card or illustration.

pub type Tagging {
  Tagging(
    illustration_id: option.Option(String),
    oracle_id: option.Option(String),
    weight: TaggingWeight,
    annotation: option.Option(String),
  )
}

Constructors

How strongly a tag applies to what it’s tagging.

pub type TaggingWeight {
  VeryStrong
  Strong
  Median
  Weak
}

Constructors

  • VeryStrong
  • Strong
  • Median
  • Weak

Values

pub fn tag_schema() -> glon.JsonSchema(Tag)
pub fn tag_type_schema() -> glon.JsonSchema(TagType)
pub fn tagging_schema() -> glon.JsonSchema(Tagging)
Search Document