MTG SDK
Client application for magicthegathering.io
Installation
Add
mtgto your list of dependencies inmix.exs:def deps do [{:mtg, "~> 0.1.0"}] endEnsure
mtgis 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.allPaging
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)Set lookup
Get set by code
You can retrieve the set by code.
MTG.Set.get("aer")