๐Ÿ€ ATproto library for gleam
atproto library gleam
35

Configure Feed

Select the types of activity you want to include in your feed.

readme: add more examples

kacaii.dev (Jun 29, 2026, 12:10 AM -0300) e9c66c29 673826f6

+31 -2
+30 -1
README.md
··· 17 17 import gleam/http/request 18 18 import possum 19 19 20 - pub fn build_request() -> request.Request(String) { 20 + pub fn main() -> Nil { 21 + // Querying your did 22 + request.new() 23 + |> request.set_host("bsky.social") 24 + |> possum.resolve_handle("tangled.org") 25 + 26 + // Acquiring a JWT token 27 + // App Passwords can be generated in you Bluesky settings. 21 28 request.new() 22 29 |> request.set_host("bsky.social") 23 30 |> possum.create_session( ··· 25 32 "bsky-app-password", 26 33 option.None, 27 34 option.None 35 + ) 36 + 37 + // Including your authorization Header 38 + request.new() 39 + |> request.set_host("bsky.social") 40 + |> possum.authorized("my-access-token") 41 + 42 + // Refreshing an authorized Session 43 + request.new() 44 + |> request.set_host("bsky.social") 45 + |> possum.refresh_session("refresh-token") 46 + 47 + // Reading public data from a repository. 48 + // No authorization needed. 49 + request.new() 50 + |> request.set_host("bsky.social") 51 + |> possum.list_records( 52 + repository: "kacaii.dev", 53 + collection: "site.standard.document", 54 + limit: option.Some(3), 55 + cursor: option.None, 56 + reverse: option.None, 28 57 ) 29 58 } 30 59 ```
+1 -1
src/possum.gleam
··· 109 109 /// let request = 110 110 /// request.new() 111 111 /// |> request.set_host("bsky.social") 112 - /// |> possum.refresh_session("refresh-jwt") 112 + /// |> possum.refresh_session("refresh-token") 113 113 /// ``` 114 114 /// 115 115 /// Documentation: [/xrpc/com.atproto.server.refreshSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.refreshSession)