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

Missing Runs/Games when ordering by date field that Run/Game does not have #159

Open
mgmedick opened this issue Nov 17, 2022 · 0 comments
Open

Comments

@mgmedick
Copy link

Hi There,

Games are Runs are missing when ordering by a date field that Game/Run does not have (date is null).

Runs:
For example, RunID “y896w0xm” has a null Submitted Date, if you filter by GameID and order by “submitted”, the run never returns in the results. Curiously if you further narrow by category the run returns, additionally if you don’t order by the date the run returns.

Run “y896w0xm” never returned:
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=200
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=400
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=200
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=600
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=200
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=800
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=1000
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=1200
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=1400
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=1600
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=1800
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&orderby=submitted&max=200&offset=2000

Run “y896w0xm” returned:
https://www.speedrun.com/api/v1/runs?game=4pd03de5&category=jdrq07lk&status=verified&orderby=submitted&max=200

Run “y896w0xm” returned:
https://www.speedrun.com/api/v1/runs?game=4pd03de5&status=verified&max=200

Work around suggestion:
Avoid using OrderBy when pulling runs unless filtering by categories or below. The 20k technique (10k one way, 10k the other) can be used when filtering by category. Otherwise just let the api use it’s default order.

Games:
For example, GameID “nd2egvd0” has a null Created Date, if you order by “created”, the game never returns in the results. If you don’t order by that date the game returns in the results. It's too laborious to go through all games and find it again, but at one point I did and confirmed this issue.

Work around suggestion:
When pulling games don’t sort by anything (let api sort by default) to get all games.

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

1 participant