feedbin/feedbin-api

Retrieving read entries, getting entry count

jbrayton opened this issue · 4 comments

When Unread retrieves articles, it shows status text such as “Retrieving unread articles (500 of 2048)”. It is able to determine the number of remaining articles because it first calls /v2/unread_entries.json, determines which entries in the result it does not have, and then retrieves those entries by calling /v2/entries.json?ids=….

Currently Unread only retrieves articles that are unread or starred, but I am adding the ability to retrieve recent articles that have already been read. Is there a way to get a list of all entry ID values newer a certain date in one API call? This would be ideal for me.

If that is not possible, is there a way to determine the total number of entries that will be returned for a call to /v2/entries.json?since= before iterating through each page of entries? (It looks like I can get an approximation based on the rel="last" link, but I am looking for something more precise.)

Thank you.

Hi @jbrayton,

There isn't a way to get this currently, but it sounds very useful and I'd be happy to add it.

What about a header like X-Feedbin-Entry-Count: 234, when calling /v2/entries.json? This would be contextual based on whatever parameters are present. For example passing since would give you the entry count since the provided date.

An X-Feedbin-Entry-Count header on /v2/entries.json would do the trick. Thank you, @benubois!

Hi @jbrayton,

This is now available. The header is called X-Feedbin-Record-Count so it can be re-used with any paginated resource.

Thanks!

Thank you, @benubois. I updated my code to take advantage of that, and it appears to work exactly as I had hoped.