[Suggestion] Avatar API Endpoint?

I have a visual interface for displaying chat, And the way I currently have to download feels very dirty.
First I have to make a request to the API for the users account, which then returns a complete URL for a users avatar.
Then, I send another web request for the avatar.

Subsequent requests per each message from tmi still makes a request to the user endpoint, however the user avatars are generally cached, saving another request from being transmitted.

In comparison to other platforms, they allow much more friendly endpoints for this data.
Mixer follows a standard URL request -> redirect url /users/{user}/avatar on their API
Youtube is more straight forward, since they don’t redirect https://i1.ytimg.com/i/{ChannelID}/1.jpg
Both are not rate limited.

why not cache all the data yourself, like usernames, avatar URLs, etc, and if they are locally cached to your visual interface, no request needs to be made.

They are being cached, but this does not stop the fact that I still require a first request to determine the URL a user’s avatar, a request that is not cached. Attempting to cache it makes the request not process correctly (Send OPTIONS, but not GET)

After making this request though, If I use the users’ avatar image, if it’s being used before, it is properly cached as the browser would behave normally.

Having an API point for this will not only bypass this first request, but is, in many implementations, handled by cache. Since a browser can handle a 303 redirect to fetch from cache

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.