curl を更新
42
curl.md
42
curl.md
@@ -388,3 +388,45 @@ fi
|
||||
}
|
||||
```
|
||||
|
||||
## profileの更新
|
||||
|
||||
```sh
|
||||
did=did:plc:vzsvtbtbnwn22xjqhcu3vd6y
|
||||
handle=syui.syui.ai
|
||||
token=`cat ~/.config/syui/ai/bot/token.json|jq -r .accessJwt`
|
||||
pds=https://syu.is
|
||||
uri=at://did:plc:vzsvtbtbnwn22xjqhcu3vd6y/app.bsky.feed.post/3lyz6bwvur22r
|
||||
cid=bafyreibdfeza4zdbq5ymufzrwppxglljskzefv2vv3fyyneb5lu7526kbi
|
||||
rev=3lyz6a6hg4k25
|
||||
|
||||
curl -sL -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $token" \
|
||||
-d "{
|
||||
\"repo\": \"$handle\",
|
||||
\"collection\": \"app.bsky.actor.profile\",
|
||||
\"rkey\": \"self\",
|
||||
\"record\": {
|
||||
\"$type\": \"app.bsky.actor.profile\",
|
||||
\"displayName\": \"$handle\",
|
||||
\"description\": \"https://$handle\",
|
||||
\"pinnedPost\": {
|
||||
\"$type\": \"com.atproto.repo.strongRef\",
|
||||
\"uri\": \"$uri\",
|
||||
\"cid\": \"$cid\"
|
||||
},
|
||||
\"avatar\": {
|
||||
\"$type\": \"blob\",
|
||||
\"ref\": {\"$link\": \"$img\"},
|
||||
\"mimeType\": \"image/jpeg\",
|
||||
\"size\": 12345
|
||||
},
|
||||
\"createdAt\": \"2025-09-17T06:21:34Z\"
|
||||
},
|
||||
\"commit\": {
|
||||
\"cid\": \"$cid\",
|
||||
\"rev\": \"$rev\"
|
||||
}
|
||||
}" \
|
||||
"$pds/xrpc/com.atproto.repo.putRecord"
|
||||
```
|
Reference in New Issue
Block a user