Replace all duplicate url parameters with a list of values.
Boolean values must be written as 'true' or 'false'.
Typeahead call has a slightly different pattern, for convenience.
All paginated API calls are wrapped into a generator.
All non-paginated API calls are cached.
Errors throw DeckBrewError.
Python: db = DeckBrewAPI()
HTTP: GET /mtg/cards
Python: db.cards()
HTTP: GET /mtg/cards?multiverseid=369080
Python: db.cards(multiverseid=369080)
HTTP: GET /mtg/cards?set=UNH&color=red&color=blue&rarity=rare
Python: db.cards(set='UNH', color=['red', 'blue'], rarity='rare')
HTTP: GET /mtg/cards?color=red&color=blue&rarity=rare&name=fire
Python: db.cards(color=['red', 'blue'], rarity='rare', name='fire')
HTTP: GET /mtg/cards?set=ons&set=scg&set=lgn&subtype=zombie&color=black
Python: db.cards(set=['ons', 'scg', 'lgn'], subtype='zombie', color='black')
HTTP: GET /mtg/cards?oracle=win+the+game&oracle=lose+the+game
Python: db.cards(oracle=['win the game', 'lose the game'])
HTTP: GET /mtg/cards/about-face
Python: db.cards('about-face') # Cached
HTTP: GET /mtg/cards/typeahead?q=sele
Python: db.typeahead('sele')
HTTP: GET /mtg/sets
Python: db.sets() # Cached
HTTP: GET /mtg/sets/ARB
Python: db.sets('ARB') # Cached
HTTP: GET /mtg/types
Python: db.types() # Cached
HTTP: GET /mtg/supertypes
Python: db.supertypes() # Cached
HTTP: GET /mtg/colors
Python: db.colors() # Cached
HTTP: GET /mtg/future_thing
Python: db.future_thing() # Cached
HTTP: GET /mtg/future_thing/param
Python: db.future_thing('param') # Cached
HTTP: GET /mtg/cards/cardnotfound
Result: {"errors":["Card not found"]}
Python: db.cards('cardnotfound')
Result: DeckBrewError: ['Card not found']