MTG SDK
Client application for magicthegathering.io
Installation
-
Add
mtgto your list of dependencies inmix.exs:def deps do[{:mtg, "~> 0.1.0"}]end -
Ensure
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.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)