lexicon を追加
54
lexicon.md
Normal file
54
lexicon.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
https://resolve-lexicon.pages.dev/
|
||||||
|
|
||||||
|
例えば、`ai.syui.log.post`を作りたいとして、まずは、`syui.ai`にdnsを追加します。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
_lexicon.log.syui.ai TXT "did=did:plc:uqzpqmrjnptsxezjx4xuh2mn"
|
||||||
|
```
|
||||||
|
|
||||||
|
次に、schemeを`did:plc:uqzpqmrjnptsxezjx4xuh2mn`にputします。
|
||||||
|
|
||||||
|
> at://did:plc:uqzpqmrjnptsxezjx4xuh2mn/com.atproto.lexicon.schema/ai.syui.log.post
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"repo": "did:plc:uqzpqmrjnptsxezjx4xuh2mn",
|
||||||
|
"collection": "com.atproto.lexicon.schema",
|
||||||
|
"rkey": "ai.syui.log.post",
|
||||||
|
"record": {
|
||||||
|
"$type": "com.atproto.lexicon.schema",
|
||||||
|
"lexicon": 1,
|
||||||
|
"id": "ai.syui.log.post",
|
||||||
|
"defs": {
|
||||||
|
"main": {
|
||||||
|
"type": "record",
|
||||||
|
"key": "tid",
|
||||||
|
"description": "Record containing a blog post.",
|
||||||
|
"record": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["title", "content", "createdAt"],
|
||||||
|
"properties": {
|
||||||
|
"title": { "type": "string", "maxLength": 3000, "maxGraphemes": 300 },
|
||||||
|
"content": { "type": "string", "maxLength": 1000000, "maxGraphemes": 100000 },
|
||||||
|
"createdAt": { "type": "string", "format": "datetime" },
|
||||||
|
"lang": { "type": "string", "maxLength": 10 },
|
||||||
|
"translations": { "type": "unknown" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ curl -X POST "https://bsky.syu.is/xrpc/com.atproto.repo.putRecord" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"repo": "did:plc:uqzpqmrjnptsxezjx4xuh2mn",
|
||||||
|
"collection": "com.atproto.lexicon.schema",
|
||||||
|
"rkey": "ai.syui.log.post",
|
||||||
|
"record": { ... }
|
||||||
|
}'
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user