Add bookmark lexicon schema to community lexicon (#12)

This commit is contained in:
Ethan Winters
2024-12-20 09:31:55 -08:00
committed by GitHub
parent 98690e561f
commit bbfe547dec
2 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,35 @@
{
"lexicon": 1,
"id": "community.lexicon.bookmarks.bookmark",
"defs": {
"main": {
"type": "record",
"description": "Record bookmarking a link to come back to later.",
"key": "tid",
"record": {
"type": "object",
"required": [
"subject",
"createdAt"
],
"properties": {
"subject": {
"type": "string",
"format": "uri"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"tags": {
"type": "array",
"description": "Tags for content the bookmark may be related to, for example 'news' or 'funny videos'",
"items": {
"type": "string"
}
}
}
}
}
}
}

View File

@ -0,0 +1,51 @@
{
"lexicon": 1,
"id": "community.lexicon.bookmarks.getActorBookmarks",
"defs": {
"main": {
"type": "query",
"description": "Get a list of bookmarks by actor. Optionally add a list of tags to include, default will be all bookmarks. Requires auth, actor must be the requesting account.",
"parameters": {
"type": "params",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"bookmarks"
],
"properties": {
"cursor": {
"type": "string"
},
"bookmarks": {
"type": "array",
"items": {
"type": "ref",
"ref": "community.lexicon.bookmarks.bookmark"
}
}
}
}
}
}
}
}