From dedaacea2bea6d4db2bc1e7f9fe026cab37e26b3 Mon Sep 17 00:00:00 2001 From: syui Date: Wed, 17 Sep 2025 06:35:01 +0000 Subject: [PATCH] =?UTF-8?q?curl=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- curl.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/curl.md b/curl.md index b3bd92e..59b06ba 100644 --- a/curl.md +++ b/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" +``` \ No newline at end of file