Only reason this is separate from #135 is because I won't be posting enough from my website for this to become a problem. It's safe to implement this separately, after gathering some request logs.
[ ] Cache remaining rate limit
[ ] Cache time remaining until reset - rather, try for date (now() + seconds if that's what I'm given)
[ ] Ensure not currently rate limited
[ ] If under limit...
[ ] continue with posting
[ ] update remaining limit on success -- from header, not manually
[ ] If timer expired...
[ ] unset both and continue posting
[ ] re-cache both - maybeCacheRateLimit($headers) or similar method?
Only reason this is separate from #135 is because I won't be posting enough from my website for this to become a problem. It's safe to implement this separately, after gathering some request logs.
now()
+ seconds if that's what I'm given)maybeCacheRateLimit($headers)
or similar method?