PeterCat12 / pysmash

A python wrapper to smash.gg Developer API
22 stars 11 forks source link

Returning sets that haven't been played yet #40

Closed LuNoX closed 7 years ago

LuNoX commented 7 years ago

Is there still a way to return all sets? I kinda need the ones that haven't been played yet instead of the ones that did...

LuNoX commented 7 years ago

Nevermind

PeterCat12 commented 7 years ago

I'm not sure I understand the question. SmashGG doesn't have records of sets that haven't been played (It doesn't know who will be in Grandfinals, etc). If a tournament is in progress it's possible that a match object without a score is created and then subsequently updated once a match is played but I have not verified this.

LuNoX commented 7 years ago

It does create sets that haven't started yet. This issue is just a consequence of another issue that I couldn't sort out yet. For some reason the query for the bracket with id 273020 doesn't return all sets in it when done through the smash.tournament_show_sets() function

PeterCat12 commented 7 years ago

I believe that pysmash does some filtering on the sets returned. I can't specifically remember what the criteria for those were but I believe they were sets that had no scores (which may be a problem for you...). I found that SmashGG had a lot of junk info, or really odd behavior at times (with their recent code update, I believe they changed the values of initialSeedNum for example). If you were to comb though the call stack for tournament_show_sets() it should be fairly obvious what sets I am not appending to the list of sets that ultimately gets returned. If you see legitmate reason for why those sets should be returned, I will accommodate.

LuNoX commented 7 years ago

I opened a separate issue lets discuss there.