pysmash icon indicating copy to clipboard operation
pysmash copied to clipboard

add additional endpoints to filter requests

Open fickleEfrit opened this issue 7 years ago • 4 comments

Currently, the only allowed behavior when filtering sets is to discard those that have been yet to be played. With this update, there is a value similar to filter_request called filter_unplayed that can be passed. If methods that filter sets are called with filter_unplayed as false, then the unplayed sets will be included in the results. This leaves current behavior unchanged, as the default value for filter_unplayed is true. This change is helpful for applications that may need to access smash.gg brackets that are in progress.

fickleEfrit avatar Dec 20 '17 20:12 fickleEfrit

@fickleEfrit In the PR description, could you describe the current functionality and contrast it to the new functionality? In addition make any necessary changes to the README file?

PeterCat12 avatar Dec 20 '17 20:12 PeterCat12

Ah! I just remembered. @fickleEfrit Please take a look at the last comment regarding the unreachable parameter in this open issue. This strikes me as the exact same issue and I think it would be best if this fix actually explored this parameter. In addition I forgot that I had agreed that this really should be 3 separate endpoints:

https://github.com/PeterCat12/pysmash/issues/41

now that I think of it, it might make sense to have three endpoints. One for completed sets (the current one), one for sets that have yet to be played, but are ready to be played (The one I need for my uses), and one for sets that have yet to be played, but are not ready to be played, as in the bracket hasn't reached that point yet (I don't know what use someone would have for this, but I'm sure that someone could have one in the future, and this way there is a way to actually retrieve those sets).

So, if you do not want to make the 3rd endpoint, I would make a new one where it (and the old one should do this too) filters on the unreachable attribute in the raw smashgg response.

PeterCat12 avatar Dec 20 '17 21:12 PeterCat12

If I correctly understood that thread, I believe I have properly added an endpoint for an unreachable set.

fickleEfrit avatar Dec 20 '17 21:12 fickleEfrit

just checking in to make sure there's no issue with my pr 😃

fickleEfrit avatar Jan 06 '18 00:01 fickleEfrit