What exactly is being returned by the API calls isn't documented, like which field is the unread count, but I didn't have any issues with what I did. I have a feeling it might have timing issues when fetching items one page at a time. Each page contains 12 items (I think), and you request each page with a page=n query parameter, which probably means you'll see duplicated items if new items come in as you're reading.
I might put the code for this up on GitHub, although it's a bit messy (since most of it was written for a backend that I was making, which worked in a somewhat different way).
What exactly is being returned by the API calls isn't documented, like which field is the unread count, but I didn't have any issues with what I did. I have a feeling it might have timing issues when fetching items one page at a time. Each page contains 12 items (I think), and you request each page with a page=n query parameter, which probably means you'll see duplicated items if new items come in as you're reading.
I might put the code for this up on GitHub, although it's a bit messy (since most of it was written for a backend that I was making, which worked in a somewhat different way).