ygo v0.1.0 YGO View Source

Documentation for YGO.

Link to this section Summary

Functions

Get all card archetypes.

Get card information based on input paramters.

Get card set information.

Get all card sets.

Get a random card.

Link to this section Functions

Specs

get_card_archetypes() :: {:error, String.t()} | {:ok, [map()]}

Get all card archetypes.

Link to this function

get_card_information(params)

View Source

Specs

get_card_information(params :: map()) :: {:error, String.t()} | {:ok, [map()]}

Get card information based on input paramters.

Args:

  • params - Map containing the card's searching properties.

Examples

{:ok,

[
%{
  "archetype" => "Dark Magician",
  "atk" => 2500,
  "attribute" => "DARK",
  "card_images" => [
    %{
      "id" => 46986414,
      "image_url" => "https://storage.googleapis.com/ygoprodeck.com/pics/46986414.jpg",
      "image_url_small" => "https://storage.googleapis.com/ygoprodeck.com/pics_small/46986414.jpg"
    }, ...
  ],
  "card_prices" => [
    %{
      "amazon_price" => "2.03",
      "cardmarket_price" => "0.02",
      ...
    }
  ],
  "card_sets" => [
    %{
      "set_code" => "CT13-EN003",
      "set_name" => "2016 Mega-Tins",
      ...
    }, ...
  ],
  "def" => 2100,
  "desc" => "The ultimate wizard in terms of attack and defense.",
  "id" => 46986414,
  "level" => 7,
  "name" => "Dark Magician",
  "race" => "Spellcaster",
  "type" => "Normal Monster"
}
]}
Link to this function

get_card_set_information(set)

View Source

Specs

get_card_set_information(set :: String.t()) ::
  {:error, String.t()} | {:ok, [map()]}

Get card set information.

Specs

get_card_sets() :: {:error, String.t()} | {:ok, [map()]}

Get all card sets.

Specs

get_random_card() :: {:error, String.t()} | {:ok, [map()]}

Get a random card.