thelegy / koma-bot

Twitter Wall with sounds for the KoMa
GNU General Public License v3.0
4 stars 1 forks source link

Images need to be shown in the tweets #8

Closed thelegy closed 8 years ago

thelegy commented 8 years ago

At the moment images in tweets are not shown. This needs to be changed.

thelegy commented 8 years ago

This is not quite trivial. The information about a tweet from the streaming api does not yield any media urls. The text field contains only the urls to the images encapsulated in a html page.

To get the needed fields the restful api must be used to hydrate the tweet infos.

It is to be noted, that this api is rate limited to 180 requests per 15 minutes. Although multiple requests could be bundled to make up for only one count. Being pedantic about this and stretching all requests equally about the time would yield one request every 5 second possibly delaying tweets for up to the same amount.

It might probably better to do it more dynamicly, so that while less tweets come the request can be sent instantaniously while under heavy load the wait time would increase to 5 or even 10 or 15 seconds or so. Details would still need to be figured out.