Nextbird / nextbird

“Life support” fork of Corebird, a native GTK+ Twitter client
GNU General Public License v3.0
11 stars 1 forks source link

Respect rate limit headers #6

Open lucaswerkmeister opened 5 years ago

lucaswerkmeister commented 5 years ago

According to Twitter’s documentation, the following HTTP headers are included in responses:

I’m not sure if -limit and -remaining are very useful to us (we could get fancy and pick an appropriate heartbeat interval automatically based on them – see #2 – but that seems unnecessary), but we could play nice by storing the -limit and just muting any network requests until that time expires, and perhaps also include that in the error message we show to the user (assuming we show that error message at all – see #4).