MagicTheGathering / mtg-sdk-python

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

Finding sets by set code pulls in all sets #29

Open MichaelJAndy opened 5 years ago

MichaelJAndy commented 5 years ago

The following code returns 448 results where it should only return one.

from mtgsdk import Set
sets = Set.find('ktk').all()
len(sets)

I obtained this snippet from the code examples on the repo readme https://github.com/MagicTheGathering/mtg-sdk-python/blob/master/README.md

Reid-E commented 5 years ago

Don't use .all() with Set.find(), or Card.find() for that matter.

The instructions on the readme say to use Set.find('ktk') When you call .all() on the returned object it gets all sets.