I’d like to share and receive bookmarks, but the spec has some room for interpretation as to how a bookmark can be represented. This is what I have so far:
- User actors have a collection called
bookmarks
- When a user wants to bookmark something, a
Add{Document}
activity is generated:
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Add",
"actor": "https://tavern.town/users/nick",
"object": {
"id": "https://tavern.town/objects/8dc00625-474e-405e-94e7-e9b17551e749",
"type": "Document",
"name": "Tavern Town",
"url": "https://tavern.town/"
},
"target": "https://tavern.town/users/nick/bookmarks"
}
I’m avoiding using the Link type because the spec implies that Links are used to create relationships between objects and target contents:
When a
Link
is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by thehref
.
This makes sense to me as mentions and hashtags are types of Links specifically used to associate content, actors or collections, with objects like Notes.
Another alternative would be to use the existing schema.org taxonomy as described on https://schema.org/WebSite. I’m hesitant to go in this direction though.
{
"@context": {
"as": "https://www.w3.org/ns/activitystreams",
"schema": "http://schema.org"
},
"@id": "https://tavern.town/activities/02e029d6-e647-4ef3-b539-bb96a8f69030",
"@type": "as:Add",
"as:actor": "https://tavern.town/users/nick",
"as:object": {
"@id": "https://tavern.town/objects/8dc00625-474e-405e-94e7-e9b17551e749",
"@type": "schema:WebSite",
"schema:url": "https://tavern.town/"
},
"as:target": "https://tavern.town/users/nick/bookmarks"
}
I was a developer on the del.icio.us team years ago and have some opinions, but I’d like to get feedback.