speedruncomorg / api

REST API Documentation for speedrun.com
349 stars 35 forks source link

Can't get recent runs of platform #108

Closed akleemans closed 3 years ago

akleemans commented 3 years ago

Hi,

I am running a WR bot for certain platforms and until yesterday, I could query newest runs of a platform like this: https://www.speedrun.com/api/v1/runs?status=verified&platform=n5683oev&orderby=verify-date&direction=desc

This gives now the following error:

{'status': 400, 'message': 'Please query by at least one of: examiner, game, guest, level, user.', 'links': [{'rel': 'support', 'uri': 'irc://speedrunslive.com#speedrun.com'}, {'rel': 'report-issues', 'uri': 'https://github.com/speedruncom/api/issues'}]}

The examples on the /runs doc give the same error ("GET /api/v1/runs?status=verified&orderby=verify-date&direction=desc gets all newly verified runs").

Do I understand it correctly that the API was changed to require one of the fields mentioned and that it's no longer possible to fetch recent runs by platform? Also, is this permanent or also just temporary due to the increased holiday traffic?

mgmedick commented 3 years ago

I also have this issue, using call below. Need to get the new runs for a period of time before submitted date > my last call date.

https://www.speedrun.com/api/v1/runs?status=new&orderby=submitted&direction=desc

GB127 commented 3 years ago

image I believe it's because of this. :)

mgmedick commented 3 years ago

Ok hopefully that's the case, because I've got a fair amount of code relying on that call working. Def would be open to discussions regarding how often, performance, etc. But to just cut it off it kind of drastic, thanks for the update GB127.

dbeal-eth commented 3 years ago

even basic query with no sorting like: https://www.speedrun.com/api/v1/runs no longer works

IS4Code commented 3 years ago

Still not working. The examples in the readme literally don't work.

ShikenNuggets commented 3 years ago

The restrictions have now been lifted. Everything should now behave the way it did before.

akleemans commented 3 years ago

@ShikenNuggets Thanks for the update. So this was intentional? Will it happen again on traffic spikes? Is there any place where we could track such issues or behaviour? (I at least am not aware of anything like that.)

AnInternetTroll commented 3 years ago

The restriction liftoff announcement was made on the official speedrun.com discord server, and so was the restriction announcement, as well as on twitter.

akleemans commented 3 years ago

The restriction liftoff announcement was made on the official speedrun.com discord server, and so was the restriction announcement, as well as on twitter.

I don't know about the Discord, but the tweet doesn't mention the API at all. "runs may take a little longer than usual to show up on the boards" is no API restriction anouncement whatsoever.

AnInternetTroll commented 3 years ago

They didn't announce on discord either anything specific about the api. We all found out when our toys stopped working :/

LewisAndSpark commented 3 years ago

Hey all! We definitely hear your feedback on better communicating API changes in the future. We appreciate your patience as this was a hotfix to deal with holiday traffic, but in the future we will aim to be more clear if we need to change the API, as well as give as much lead time as possible. This may not be much depending on the situation, but we understand how updates can affect your tools and want to be cognizant of impact as much as we can.

IS4Code commented 3 years ago

No worries, but I'd suggest more descriptive error messages in the future, like the reason of the unavailability, and not that the user has to specify some parameter to make it work.

akleemans commented 3 years ago

@AlicenLewis Thank you very much for your answer. Such a prior notice on API changes would be much appreciated.

Closing this issue, nothing more to be done here.