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
Here is a diff of the changes.
The main differences can be read here:
Some silo examples of "home" vs "notifications":
and of course more on the wiki
Some discussion from IRC about whether hardcoding a "home" channel even makes sense in the first place.
@aaronpk I’m having trouble with OwnYourGram — it posted a few photos on 1/29 but nothing since then. When I hit Post manually, I get “There was an error posting the photo!”. I authenticate as avi.micro.blog — any chance you could take a quick look? Thanks!
@aaronpk I’m having trouble with OwnYourGram — it posted a few photos on 1/29 but nothing since then. When I hit Post manually, I get “There was an error posting the photo!”. I authenticate as avi.micro.blog — any chance you could take a quick look? Thanks!
@oyam To me, the difference is that it wouldn't be acceptable if we allowed hashtags but only #books and nothing else. Because emoji are already finite, focusing on a smaller set doesn't seem as unusual.
My first thought is concerning potentially writing posts offline. I think I would like to be able to query my micropub endpoint and get an array of contacts, in the same way I can get an array of syndication targets. This allows the ability to be writing a post offline and to power either person tagging or @-mentioning.
Right now you can only have one draft post at a time (if you click cancel while writing a post, it will ask if you want to save you post as a draft, if so it will auto-fill the form when you open it back up again).
Eventually I would like if you are offline to click "Post" and to have it auto-post when it gets internet again. So in those cases I would want to be able to handle all nickname cache stuff on device after the initial login (and maybe periodically refetching the cache every couple of days or something).
I can see how it could be useful to query the server with the string so far in a situation where you know you have internet.