๐Ÿ€ ATproto XRPC client for gleam possum.hexdocs.pm
gleam atproto xrpc-client library
40

Configure Feed

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

possum: improve documentation

kacaii.dev (Jun 29, 2026, 11:29 AM -0300) 0f23eca0 32c28f55

+34 -11
+34 -11
src/possum.gleam
··· 15 15 /// Documentation: [xrpc/com.atproto.server](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver) 16 16 const com_atproto_server = "xrpc/com.atproto.server" 17 17 18 - /// PLC stands for "Public Ledger of Credentials" 19 - /// Resolves a DID Document from the plc.directory 18 + /// Resolves a DID Document from the plc.directory, 19 + /// this returns information about a Decentralized Identifier (DID), 20 + /// including their handle and service endpoint. 20 21 /// 21 - /// This returns information about a Decentralized Identifier (DID), 22 - /// including their handle and their service endpoint. 22 + /// AT Protocol uses Decentralized Identifiers (DIDs) as persistent account 23 + /// identifiers. PLC stands for "Public Ledger of Credentials". 23 24 /// 24 25 /// ## Examples 25 26 /// ··· 33 34 /// request.new() 34 35 /// |> possum.resolve_did_document(did) 35 36 /// ``` 37 + /// 38 + /// Documentation: [AT Protocol DIDs](https://atproto.com/specs/did) 36 39 pub fn resolve_did_document( 37 40 request: request.Request(_), 38 41 did: String, ··· 46 49 /// Resolves an atproto handle (hostname) to a DID. 47 50 /// Does not necessarily bi-directionally verify against the the DID document. 48 51 /// 52 + /// DIDs are the long-term persistent identifiers for accounts in atproto, 53 + /// but they can be opaque and unfriendly for human use. 54 + /// Handles are mutable and human-friendly account usernames, 55 + /// in the form of a DNS hostname. For example, user.example.com. 56 + /// Handles must be bi-directionally linked to a DID: the DID document must claim 57 + /// the handle, and the handle must resolve to the DID identifier. 58 + /// 59 + /// Two methods of resolving handles to DID are supported: one using 60 + /// TXT DNS records, and the other using an HTTPS /.well-known/ URL path. 61 + /// 49 62 /// ## Examples 50 63 /// 51 64 /// ```gleam ··· 58 71 /// |> possum.resolve_handle("kacaii.dev") 59 72 /// ``` 60 73 /// 61 - /// Documentation: [/xrpc/com.atproto.identity.resolveHandle](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoidentity/GET/xrpc/com.atproto.identity.resolveHandle) 74 + /// Endpoint Docs: [/xrpc/com.atproto.identity.resolveHandle](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoidentity/GET/xrpc/com.atproto.identity.resolveHandle) 62 75 pub fn resolve_handle( 63 76 request: request.Request(_), 64 77 handle: String, ··· 89 102 /// ) 90 103 /// ``` 91 104 /// 92 - /// Documentation: [/xrpc/com.atproto.server.createSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.createSession) 105 + /// Endpoint Docs: [/xrpc/com.atproto.server.createSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.createSession) 93 106 pub fn create_session( 94 107 request: request.Request(_), 95 108 did: String, ··· 140 153 /// |> possum.refresh_session("refresh-token") 141 154 /// ``` 142 155 /// 143 - /// Documentation: [/xrpc/com.atproto.server.refreshSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.refreshSession) 156 + /// Endpoint Docs: [/xrpc/com.atproto.server.refreshSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.refreshSession) 144 157 pub fn refresh_session( 145 158 request: request.Request(_), 146 159 refresh token: String, ··· 167 180 /// |> possum.get_session_info 168 181 /// ``` 169 182 /// 170 - /// Documentation: [/xrpc/com.atproto.server.getSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.getSession) 183 + /// Endpoint Docs: [/xrpc/com.atproto.server.getSession](https://endpoints.bsky.app/#bluesky-app/tag/comatprotoserver/POST/xrpc/com.atproto.server.getSession) 171 184 pub fn get_session_info(request: request.Request(_)) -> request.Request(_) { 172 185 request 173 186 |> request.set_method(http.Get) ··· 210 223 /// |> possum.describe_repository("kacaii.dev") 211 224 /// ``` 212 225 /// 213 - /// Documentation: [/xrpc/com.atproto.repo.describeRepo](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.describeRepo) 226 + /// Endpoint Docs: [/xrpc/com.atproto.repo.describeRepo](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.describeRepo) 214 227 pub fn describe_repository( 215 228 request: request.Request(_), 216 229 did: String, ··· 222 235 } 223 236 224 237 /// Get a single record from a repository. 238 + /// 239 + /// A **record key** (rkey) is used to name and reference an individual record 240 + /// withing the same collection of an repository. 225 241 /// 226 242 /// ```gleam 227 243 /// import gleam/http/request ··· 239 255 /// ) 240 256 /// ``` 241 257 /// 242 - /// Documentation: [/xrpc/com.atproto.repo.getRecord](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.getRecord) 258 + /// Endpoint Docs: [/xrpc/com.atproto.repo.getRecord](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.getRecord) 259 + /// Documentation: [atproto.com](https://atproto.com/specs/record-key) 243 260 pub fn get_record( 244 261 request: request.Request(_), 245 262 did: String, ··· 284 301 /// ) 285 302 /// ``` 286 303 /// 287 - /// Documentation: [/xrpc/com.atproto.repo.listRecords](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.listRecords) 304 + /// Endpoint Docs: [/xrpc/com.atproto.repo.listRecords](https://endpoints.bsky.app/#bluesky-app/tag/comatprotorepo/GET/xrpc/com.atproto.repo.listRecords) 288 305 pub fn list_records( 289 306 request: request.Request(_), 290 307 did: String, ··· 321 338 322 339 /// List published articles, blog posts and other content. 323 340 /// 341 + /// The site.standard.document lexicon provides metadata for individual documents. 342 + /// Including the document's relation to a publication if applicable, 343 + /// a path to the document, and more information like a document's complete contents. 344 + /// 324 345 /// ## Examples 325 346 /// 326 347 /// ```gleam ··· 332 353 /// |> request.set_host("service-endpoint") 333 354 /// |> possum.list_standard_documents("kacaii.dev", option.None) 334 355 /// ``` 356 + /// 357 + /// Documentation: [standard.site](https://standard.site/) 335 358 pub fn list_standard_documents( 336 359 request: request.Request(_), 337 360 did: String,