ai/at
ai/at
1
0
This commit is contained in:
syui 2024-11-27 22:10:23 +09:00
parent 5bdf1c92e6
commit 57013e14ee
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

20
at.zsh
View File

@ -11,10 +11,10 @@ host=(
plc.directory
)
lexicon=(
xrpc/com.atproto.repo.describeRepo
xrpc/com.atproto.repo.getRecord
xrpc/com.atproto.repo.listRecords
xrpc/com.atproto.identity.resolveHandle
/xrpc/com.atproto.repo.describeRepo
/xrpc/com.atproto.repo.getRecord
/xrpc/com.atproto.repo.listRecords
/xrpc/com.atproto.identity.resolveHandle
)
function at-env(){
@ -30,8 +30,8 @@ function at-uri-search(){
if [ -n "$1" ];then
at_uri=$1
fi
req=xrpc/com.atproto.repo.getRecord
url=https://${host}/${req}
req=/xrpc/com.atproto.repo.getRecord
url=https://${host}${req}
did=`echo $at_uri|cut -d / -f 3`
collection=`echo $at_uri|cut -d / -f 4`
rkey=`echo $at_uri|cut -d / -f 5`
@ -42,8 +42,8 @@ function at-did-search(){
if [ -n "$1" ];then
handle=$1
fi
req=xrpc/com.atproto.repo.describeRepo
url=https://${host}/${req}
req=/xrpc/com.atproto.repo.describeRepo
url=https://${host}${req}
curl -sL "$url?repo=$handle"|jq .
}
@ -55,8 +55,8 @@ function at-collection-search(){
if [ "$2" = "-r" ];then
reverse=true
fi
req=xrpc/com.atproto.repo.listRecords
url=https://${host}/${req}
req=/xrpc/com.atproto.repo.listRecords
url=https://${host}${req}
did=`echo $at_uri|cut -d / -f 3`
collection=`echo $at_uri|cut -d / -f 4`
curl -sL "$url?repo=$did&collection=$collection&reverse=$reverse"|jq .