Multiple times a day, I switch between my laptop and my phone. It’s frustrating that I have to ask myself “have I seen this post?” as I scroll through My Stream. Today we’re adding support for Stream Markers to the API. This will allows clients to sync where you are in your stream, global, and even in individual threads between clients.
In the response envelope for all streams that support markers, there will now be a Stream Marker object. If a marker hasn’t been set, it will just include the name of the stream so you can set a marker:
If a marker has been set, it will include information about when the marker was last updated including the Post ID of the post at the top of the window, a timestamp, and an opaque value representing the version of this marker so you can easily see if it’s been updated.
Stream Markers aren’t meant to broadcast a User scrolling through a stream in real time so we recommend that you only update a marker when a user is changing to a different stream, closing the client, or has stopped scrolling for at least 10 seconds. To update a marker, just POST a JSON dictionary that matches our Stream Marker schema with the correct stream name:
If you store the “version” that’s returned, you’ll be able to tell when a user has changed position on a different client and update accordingly.
Currently the following streams can be marked:
- Global Stream
- My Stream
- Unified Stream
- My Mentions
- An individual user’s stream of posts
- A hashtag stream
- The replies stream for a post
As always, let us know if you have any feedback through any of the developer support channels listed here.
Pingback: App.net’s new API feature: Stream Marker by Colin Devroe
Pingback: Core Intuition » Episode 65: Sensitive To Security
Pingback: Stream markers now supported in Alpha | App.net