up readme

syui 2 months ago
parent 162c7eabc5
commit a66c484fb8
Signed by: syui
GPG Key ID: 67AC97A939D3EA19

1
.gitignore vendored

@ -1,2 +1,3 @@
.env
fly.toml
*.json

@ -101,23 +101,32 @@ curl -X POST -H "Content-Type: application/json" -d "$json" $url
Ok
```
### session
### invite code
```sh
# com.atproto.session.create
$ host=bsky.social
$ user=syui
$ pass=xxx
$ curl -X POST -H "Content-Type: application/json" -d "{\"handle\":\"$user.$host\",\"password\":\"$pass\"}" https://$host/xrpc/com.atproto.session.create
```
> packages/pds/src/api/com/atproto/account/createInviteCode.ts
### profile
```sh
$ url=https://$host/xrpc/com.atproto.account.createInviteCode
$ url="https://$host/xrpc/app.bsky.actor.getProfile?actor=syui.syui.ai"
$ token=`cat token.json| jq -r .accessJwt`
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $token" $url
```
### invite code
### session
> packages/pds/src/api/com/atproto/account/createInviteCode.ts
```sh
# com.atproto.session.create
$ host=bsky.social
$ user=syui
$ pass=xxx
$ curl -X POST -H "Content-Type: application/json" -d "{\"handle\":\"$user.$host\",\"password\":\"$pass\"}" https://$host/xrpc/com.atproto.session.create
$ url=https://$host/xrpc/com.atproto.account.createInviteCode
$ token=`cat token.json| jq -r .accessJwt`
$ json="{\"useCount\":5}"
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url
```

Loading…
Cancel
Save