Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding sets by set code pulls in all sets #29

Open
MichaelJAndy opened this issue May 24, 2019 · 1 comment
Open

Finding sets by set code pulls in all sets #29

MichaelJAndy opened this issue May 24, 2019 · 1 comment

Comments

@MichaelJAndy
Copy link

MichaelJAndy commented May 24, 2019

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
Copy link
Contributor

Reid-E commented May 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants