Polymarket.Schemas.Tag (Polymarket v0.1.1)

Copy Markdown View Source

A tag attached to a Market returned by the Gamma API.

Summary

Functions

Builds a Tag from the raw (JSON-decoded) Gamma attributes. Keys may be in camelCase (atom or string); they are normalised to the snake_case fields and each value is coerced to its field type.

Types

t()

@type t() :: %Polymarket.Schemas.Tag{
  created_at: DateTime.t() | nil,
  created_by: integer() | nil,
  force_hide: boolean() | nil,
  force_show: boolean() | nil,
  id: String.t() | nil,
  is_carousel: boolean() | nil,
  label: String.t() | nil,
  published_at: DateTime.t() | nil,
  requires_translation: boolean() | nil,
  slug: String.t() | nil,
  updated_at: DateTime.t() | nil,
  updated_by: integer() | nil
}

Functions

from_attrs(attrs)

@spec from_attrs(map()) :: {:ok, t()}

Builds a Tag from the raw (JSON-decoded) Gamma attributes. Keys may be in camelCase (atom or string); they are normalised to the snake_case fields and each value is coerced to its field type.