MagicTheGathering / mtg-sdk-java

Magic: The Gathering SDK - Java
MIT License
67 stars 23 forks source link

set.getCards() returns null in v0.0.10 #22

Closed Lakuna closed 5 years ago

Lakuna commented 5 years ago

The project I'm currently working on in which this is an issue is here:

https://github.com/T3rrabyte/MTGDS

thechucklingatom commented 5 years ago

Is this all sets or a specific set you are getting the error with?

Lakuna commented 5 years ago

Every set.

thechucklingatom commented 5 years ago

Okay, I will take a look hopefully tonight or tomorrow, and will update with additional information as needed.

Lakuna commented 5 years ago

Thank you for the quick response!

thechucklingatom commented 5 years ago

I did not realize you are using getAllSets().get(index).getCards; I am not sure if the rate limits on the api will allow for getting all sets and referencing the cards that way. I am building out a test currently and going to give it a run. It will also drastically slow down the performance of getAllSets, so I may be adding a new method of getAllSetsWithCards();

thechucklingatom commented 5 years ago

Should be fixed in ae007cf602a61b30e09f771c630742539e0c2d64 which will be appearing as v0.0.11. There will be a future v0.0.12 release that will also add this functionality to a filter get all sets.