atproto を更新
parent
4c22361bd7
commit
b0ce53c455
18
atproto.md
18
atproto.md
@ -36,6 +36,24 @@ url=$api/com.atproto.repo.getRecord
|
||||
curl -sL "$url?repo=$did&collection=$collection&rkey=$rkey&cid="|jq .
|
||||
```
|
||||
|
||||
## login
|
||||
|
||||
```sh
|
||||
# session
|
||||
host=bsky.social
|
||||
handle=syui.bsky.social
|
||||
pass=xxx
|
||||
url=https://$host/xrpc/com.atproto.server.createSession
|
||||
curl -sL -X POST -H "Content-Type: application/json" -d "{\"identifier\":\"$handle\",\"password\":\"$pass\"}" $url
|
||||
|
||||
# refresh
|
||||
j=`!!`
|
||||
token=`echo $j|jq -r .accessJwt`
|
||||
refresh=`echo $j|jq -r .refreshJwt`
|
||||
url=https://$host/xrpc/com.atproto.server.refreshSession
|
||||
curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url
|
||||
```
|
||||
|
||||
## jq
|
||||
|
||||
ここでは[aios](https://git.syui.ai/ai/os)にインストールされている[jq](https://github.com/jqlang/jq), [dasel](https://github.com/TomWright/dasel)の`example`をまとめます。
|
||||
|
Loading…
Reference in New Issue
Block a user