diff --git a/CHANGELOG.md b/CHANGELOG.md index 00afad9..0c6307d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v3.0.0 - Unreleased +## [v3.0.0] - Unreleased ### Changed @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [possum] Most functions now create a new request internally when being called, there's no need to pipe `request.new()` into them. -## v2.1.0 - 2026-07-12 +## [v2.1.0] - 2026-07-12 ### Added diff --git a/README.md b/README.md index f934e74..10ab233 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ gleam add possum gleam_http gleam_json ### Decentralized Identifiers (DIDs) ```gleam -import gleam/http/request import possum/did import possum/handle import possum @@ -35,9 +34,9 @@ import possum // Handle validation let assert Ok(handle) = handle.parse("gleam.run") -request.new() -|> request.set_host("slingshot.microcosm.blue") -|> possum.resolve_handle(handle) +// Resolve an atproto handle (hostname) to a DID. +let request = + possum.resolve_handle(handle, pds: "slingshot.microcosm.blue") // Use `did.parse` to turn strings into valid DID format let assert Ok(did) = did.parse("did:plc:ewvi7nxzyoun6zhxrhs64oiz") @@ -46,13 +45,12 @@ let assert Ok(did) = did.parse("did:plc:ewvi7nxzyoun6zhxrhs64oiz") ### Building HTTP Requests ```gleam -import gleam/http/request import possum/did import possum/nsid import possum let assert Ok(did) = did.parse("did:plc:ewvi7nxzyoun6zhxrhs64oiz") -let assert Ok(collection) = nsid.parse("sh.tangled.repo") +let assert Ok(collection) = nsid.parse("site.standard.document") // Reading public data from repositories, no Authorization needed. let request =