MTG SDK

Client application for magicthegathering.io

Installation

  1. Add mtg to your list of dependencies in mix.exs:

    def deps do
    [{:mtg, "~> 0.1.0"}]
    end
  2. Ensure mtg is started before your application:

    def application do
    [applications: [:mtg]]
    end

Usage

Card lookup

All cards

This will return up to 100 cards at a time.

MTG.Card.all

Paging

MTG.Card.all(page: 5, page_size: 50)

Filter

You can filter on certain parameters.

MTG.Card.all(set: "aer", subtypes: "warrior,human")

Get specific card

You can retrieve one card based on multiverse id.

MTG.Card.get(386616)