66°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • aaronpk https://github.com/aaronpk   •   Jan 30

    #4 Tracking read state or position

    Aaron Parecki

    I'm implementing a draft of this in Aperture right now. Here is the current API.

    Every entry now includes a unique system ID, meant for internal identification of the item (not global identification). This is returned in the timeline response as the parameter _id, and there is now also _is_read. For example:

    {
      "items": [
        {
          "type": "entry",
          "url": "http://example.com/100",
          ...
          "_id": "41003",
          "_is_read": false
      ]
    }
    

    These new _id values are meant to be opaque to clients, and must always be a string. Some servers will likely use integer database IDs, but other servers may use other string identifiers for entries depending on the implementation.

    Retrieving the list of channels now also includes the number of unread entries in the channel:

    {
      "channels": [
        {
          "uid": "notifications",
          "name": "Notifications",
          "unread": 0
        },
        {
          "uid": "YPGiUrZjNM36LNdpFy7eSzJE7o2aK82z",
          "name": "IndieWeb",
          "unread": 7
        }
      ]
    }
    

    To mark an individual entry as read:

    • action=timeline
    • channel=example
    • method=mark_read
    • entry=1234

    To mark multiple entires as read:

    • action=timeline
    • channel=example
    • method=mark_read
    • entry[]=1234
    • entry[]=5678

    Both of the above also work with method=mark_unread.

    To mark an entry read as well as everything before it:

    • action=timeline
    • channel=example
    • method=mark_read
    • last_read_entry=1234

    This is to address the use case of streams, where you really only care about knowing where in the stream you've scrolled to and whether there are any new entries since then.

    This is mostly inspired by the Feedly Markers API Mark one or more articles as read and Mark a feed as read

    Portland, Oregon, USA
    Mon, Feb 12, 2018 8:11am -08:00 #microsub #aperture
    1 reply
    • Aaron Parecki aaronparecki.com
      I should add that the `_id` values are meant to be an identifier for this instance of the entry in the channel, not an identifier for the entry across channels. This means if you're following the same feed in multiple channels, entries may have a different `_id`.
      Mon, Feb 12, 2018 3:11am -08:00
Posted in /replies using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv