Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan committed Nov 25, 2024
1 parent 8974a06 commit bd61ba1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/video/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Example code for uploading a video

1. First, get a token by `com.atproto.server.getServiceAuth`.

2. Call uploadVideo against the video service (`video.bsky.app`) with the token.

3. Call `app.bsky.video.getJobStatus` against the video service as well.

(The same goes for `app.bsky.video.getUploadLimits`, which gets a token and calls the video service with it to get the data, but the process of checking this may be omitted.)

In Atrium:

- Since `AtpAgent` cannot process XRPC requests with the token obtained by `getServiceAuth`, we need to prepare a dedicated Client and create an `AtpServiceClient` that uses it.
- The `app.bsky.video.uploadVideo` endpoint is special (weird?) and requires special hacks such as adding query parameters to the request URL and modifying the response to match the schema.

0 comments on commit bd61ba1

Please sign in to comment.