Closed ankur-kayal closed 1 year ago
Thank you for the clarification!
How often is this information updated?
It's updated after a contest is over. That means it's updated at most twice a week.
I am planning to hit this endpoint once in every 5 minutes. Is this okay with you guys?
Yes, you can, if you handle 304 responses: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304
Once you get a JSON file, please add an HTTP header If-Modified-Since. If the file is updated, the server will return the new file with 200. If there's no update, the server will return an empty response body with 304.
Thanks!
Hi @kenkoooo I think this file is updated more than 2 times a week, I ran my script for about 12 hours and it has updated more than 3 times already. Is this expected?
@ankur-kayal I didn't notice. How were they different?
I am not logging that but checked that the If-last-modified header indeed change. And it matches with my logs.
I guess the file content wasn't updated. The header was automatically updated by AWS. I didn't expect that behavior, but it shouldn't be a problem. You don't need to change your logic. Thank you for putting If-Modified-Since
header.
Hi Team,
I am planning to use this api: https://kenkoooo.com/atcoder/resources/merged-problems.json for one of my personal hobby projects. I need some information and clarification regarding this api endpoint:
Thanks.