MagicTheGathering / mtg-sdk-python

Magic: The Gathering SDK - Python
MIT License
255 stars 45 forks source link

Unable to load sets whose name contains an apostrophe. #17

Closed gtdrakeley closed 5 years ago

gtdrakeley commented 5 years ago

If you try a card query by set, and the name of the set contains an apostrophe urllib throws HTTP Error 500.

Card.where(set="Urza's Saga").all()

MisanthropicBit commented 5 years ago

According to the docs, the set parameter is the set's code, not its name. The query Card.where(setName="Urza's Saga") should work.

The first card is Absolute Grace which is in Urza's Saga.

gtdrakeley commented 5 years ago

Oh, that was my mistake. Set name's without parentheses merely return an empty "cards" array, so they appeared to work in my script while names containing apostrophes would throw an error. Thank you for clearing that up. I will close this.