lexicons: new app.bsky.graph.getRelationships endpoint (#2059)
* lexicons: new app.bsky.graph.getRelationships endpoint * getRelationships: maxLength 30 * getRelationships: camelCase, consistent, simplify * getRelationships: remove blocks; and handle in return * lex: move graph relationships to defs file
This commit is contained in:
parent
ffd6c25cc0
commit
fb979b1cc5
lexicons/app/bsky/graph
@ -67,6 +67,33 @@
|
||||
"muted": { "type": "boolean" },
|
||||
"blocked": { "type": "string", "format": "at-uri" }
|
||||
}
|
||||
},
|
||||
"notFoundActor": {
|
||||
"type": "object",
|
||||
"description": "indicates that a handle or DID could not be resolved",
|
||||
"required": ["actor", "notFound"],
|
||||
"properties": {
|
||||
"actor": { "type": "string", "format": "at-identifier" },
|
||||
"notFound": { "type": "boolean", "const": true }
|
||||
}
|
||||
},
|
||||
"relationship": {
|
||||
"type": "object",
|
||||
"description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": { "type": "string", "format": "did" },
|
||||
"following": {
|
||||
"type": "string",
|
||||
"format": "at-uri",
|
||||
"description": "if the actor follows this DID, this is the AT-URI of the follow record"
|
||||
},
|
||||
"followedBy": {
|
||||
"type": "string",
|
||||
"format": "at-uri",
|
||||
"description": "if the actor is followed by this DID, contains the AT-URI of the follow record"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
51
lexicons/app/bsky/graph/getRelationships.json
Normal file
51
lexicons/app/bsky/graph/getRelationships.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.getRelationships",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Enumerates public relationships between one account, and a list of other accounts",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["actor"],
|
||||
"properties": {
|
||||
"actor": { "type": "string", "format": "at-identifier" },
|
||||
"others": {
|
||||
"type": "array",
|
||||
"maxLength": 30,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "at-identifier"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["relationships"],
|
||||
"properties": {
|
||||
"actor": { "type": "string", "format": "did" },
|
||||
"relationships": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"app.bsky.graph.def#relationship",
|
||||
"app.bsky.graph.defs#notFoundActor"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{
|
||||
"name": "ActorNotFound",
|
||||
"description": "the primary actor at-identifier could not be resolved"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user