feat(api): API Endpoints for lists of unread entry IDs and starred entry IDs#4372
Conversation
…a list of all entry IDs for entries that are unread for that user.
…a list of all entry IDs for entries that are starred.
fguillot
left a comment
There was a problem hiding this comment.
The new endpoints look good overall. However, there doesn't appear to be any pagination or limit on the number of results returned. For users with a large number of unread or starred entries, this could generate very large responses and potentially overwhelm smaller Miniflux instances.
…y-ids API endpoints This limits the responses to 10,000 ID values. The response has a total number of records, and the individual entry ID values based on the limit and offset. With 10,000 ID values per response, the maximum response size should be just under 100KB (assuming 9-digit ID values). The MaxEntryIDsLimit value is higher than MaxEntryLimit (100) because ID values are so much smaller than entire entries.
…v2 into entry-id-lists-take-2
|
I added pagination to both API endpoints, with 10,000 ID values per response. Let me know what you think. Thank you! |
|
For consistency with the rest, it would be preferable to move the new endpoints under
Instead of
In the future, more filters could be added. Similar to the |
…o one API endpoint that accepts query parameters: /v1/entries/ids.
|
I combined the API endpoints into one, with Thank you. |
Partly merge modified miniflux#4372
Description: This pull request adds two API endpoints:
/v1/unread-entry-idsreturns a list of IDs of all entries that are marked unread./v1/starred-entry-idsreturns a list of IDs of all entries that are marked starred.Motivation: I develop Unread and am seriously considering adding support for syncing with Miniflux via its API. Unread can sync with Miniflux now using the Fever API, but that has some limitations. Unread would need an ability to quickly determine what read/unread changes and what starred/unstarred changes have happened on articles that it is already storing locally. These endpoints provide that.
Testing: I added unit tests and integration tests. I also tested against real accounts on an instance of Miniflux running on my computer. I ran all unit tests and integration tests, and the linter.
Breaking Changes: There are no breaking changes.
Related Issues: Issue #2194 requests this.
Have you followed these guidelines?
BTW I am happy to also contribute an associated documentation pull request to the
websiterepository. I figured I would wait to see if this was accepted, but let me know if you want that right away.