API Problems
3 years ago
Maryland, USA

One of my bots uses this query to find recently verified speedruns:

https://www.speedrun.com/api/v1/runs?status=verified&orderby=verify-date&direction=desc&embed=game,category.variables,players,level

It queries every minute. However, over the past few days, the results have been inconsistent. Example:

At 10:02, run A is the most recent run (first run returned, because orderby=verify-date). At 10:05, run B is the most recent run, which has a date that is earlier than run A (in fact, run A can not be found in the query results). At 10:06, run A is the most recent run again.

Since I'm using the verify-time to determine if there are new runs to process, the result is runs being "new" multiple times over the course of 5-10 minutes and being repeated.

Any sort of idea why this might be happening? It only started a few days ago.

Flewb, Oxknifer, and
Deleted
like this
Canada

Sounds like a bug on our end. I have a few theories on what this might be, but I'll skip the speculation and just pass it on to the admins and let them figure out what's going on. In the meantime, as for a possible workaround on your end, I think your best bet would be to cache a few of the most recent run IDs you get and cross-reference against those as well when checking for new runs.

Also, I don't know what your exact use case for this is, but querying every minute sounds a bit overkill.

Texas, USA

Here's the use case, for more info: http://mattbraddock.com/run-get/

In the Mobile Speedrunning Discord, we use this bot to update us on any mobile run verified. The bot has its own dedicated channel so everyone can be featured :))