Magic The Gathering API - Elixir wrapper

This is a simple Elixir wrapper around the Magic The Gathering API

Installation

First, add MTG to your mix.exs dependencies:

def deps do
  [{:mtg_api, "~> 0.1.0"}]
end

and run $ mix deps.get.

Usage

All the endpoints detailed in the Official API docs are available. Here's a run down of them:

iex>{:ok, cards} = MTG.cards
iex>{:ok, card} = MTG.card(386616)
iex>{:ok, powerful_cards} = MTG.cards(params: %{power: "gt3"})

iex>{:ok, ktk_cards} = MTG.cards(params: %{set: "ktk"})
iex>{:ok, sets} = MTG.sets
iex>{:ok, sets} = MTG.set("ktk")
iex>{:ok, cards} = MTG.booster("ktk")
iex>{:ok, cards} = MTG.types
iex>{:ok, cards} = MTG.supertypes
iex>{:ok, cards} = MTG.subtypes
iex>{:ok, cards} = MTG.formats

See Advanced Usage for more info

License

Copyright © 2017 Miguel Palhas

This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the LICENSE file for more details.