So I just tried the api on two entries https://your.site//tt-rss//public.php?op=feed_icon&id=193
And one returned me an image in the middle of the screen. The other, which I notice in the phone doesn’t have a logo, tried to download a bmp file.
Unsure how (or if ) this would be handled by the ios app.
there’s isn’t an API-specific endpoint at the moment, I can add one if needed.
the generic endpoint which web UI is using is not authenticated so you can you use that one for the time being. basically just change the URL in the app.
Yeah same here I assume that’s all good but @Tiberius would need to update the app to utilize it I suppose. I never bothered to reach out for support because I wasn’t all that worried about it. But if fox is going to put in the effort to do something about it I think we’d need to get Tiberius to comment.
For now, I retrieve the icon path in the “icons_url” of the getConfig.
Then I download the icon with this url icons_url/feed_id.ico
Of course, if @fox adds getFeedIcon I’ll need to update the app to use this new function depending on the API level. I’m checking API level with getApiLevel but don’t use it for now (I think we are still at level 1 ?)
@fox the problem is if I use this endpoint, there is no local cache, so every time I download a feed, I need to get it’s icon. Perhaps if the getFeeds return the icon in the JSON this should avoid multiple calls to the API ?
Yes, I can save the data locally, but how can I know if I need to update the data ?
Or I can just let the user to force the refresh if he wants (there is already an option in the app for that)
When you say “image binary”, what is the format of the result ? a json containing base64 image data ?
Because every API call returns a JSON, so sending the image in a base64 JSON is logical. Otherwise, it will break the logic of my software because all calls are made the same way and the JSON decoding is automatic.
it would be incredibly idiotic to return an image as a JSON (how? base64 encoded? why?)
To keep the logic of returning a JSON. For small images, you can easily base64_encode your file to send it in a JSON message. This is one of the ways that is used in the Rest APIs for transfering binaries. And with a JSON, you can also sent other data with this file if you want, a comment for example, or whatever you want, with just one JSON.
I’m not saying that getting the file is difficult, but I’m working on this app on my spare time, if I can easily add this call, i’ll do it, otherwise, I won’t, at least for now, until I find time to work on it.