Packages

A small, transport-agnostic atproto client for Gleam: XRPC, identity, OAuth discovery, blobs, and repo CRUD.

Current section

Files

Jump to
atproto_client src atproto uri.gleam
Raw

src/atproto/uri.gleam

//// Helpers for at-uris (`at://<did>/<collection>/<rkey>`).
import gleam/list
import gleam/result
import gleam/string
/// The record key is the last `/`-separated segment of an at-uri.
pub fn rkey(at_uri: String) -> String {
at_uri
|> string.split("/")
|> list.last
|> result.unwrap("")
}