fix
This commit is contained in:
parent
57013e14ee
commit
e3faeeb975
20
at.zsh
20
at.zsh
@ -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
|
||||
com.atproto.repo.describeRepo
|
||||
com.atproto.repo.getRecord
|
||||
com.atproto.repo.listRecords
|
||||
com.atproto.identity.resolveHandle
|
||||
)
|
||||
|
||||
function at-env(){
|
||||
@ -62,6 +62,15 @@ function at-collection-search(){
|
||||
curl -sL "$url?repo=$did&collection=$collection&reverse=$reverse"|jq .
|
||||
}
|
||||
|
||||
|
||||
function at-docs(){
|
||||
for i in $lexicon; do
|
||||
req=`echo $i|tr '.' '-'|sed 's/[A-Z]/-&/g'|tr '[A-Z]' '[a-z]'`
|
||||
url=https://docs.bsky.app/docs/api/$req
|
||||
echo $url
|
||||
done
|
||||
}
|
||||
|
||||
at-env
|
||||
case $1 in
|
||||
uri|u)
|
||||
@ -73,6 +82,9 @@ case $1 in
|
||||
collection|c)
|
||||
at-collection-search $2 $3
|
||||
;;
|
||||
at-docs|docs)
|
||||
at-docs
|
||||
;;
|
||||
*)
|
||||
echo "${help[@]}"
|
||||
echo "${host[@]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user