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

Configure Feed

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

test: get handle, did and pds host from env

kacaii.dev (Jul 1, 2026, 2:45 PM -0300) ff44a45a 4a1aa301

+15
+1
gleam.toml
··· 20 20 gleeunit = ">= 1.0.0 and < 2.0.0" 21 21 gleam_httpc = ">= 5.0.0 and < 6.0.0" 22 22 global_value = ">= 1.0.0 and < 2.0.0" 23 + envoy = ">= 1.2.0 and < 2.0.0"
+2
manifest.toml
··· 7 7 # You should check this file into your source control repository. 8 8 9 9 packages = [ 10 + { name = "envoy", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "9C6FBB6BFA02A52798BEEC5977A738CAD6E4A057F4B67FD0C8061AD2502C191A" }, 10 11 { name = "gleam_erlang", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "1124AD3AA21143E5AF0FC5CF3D9529F6DB8CA03E43A55711B60B6B7B3874375C" }, 11 12 { name = "gleam_http", version = "4.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "82EA6A717C842456188C190AFB372665EA56CE13D8559BF3B1DD9E40F619EE0C" }, 12 13 { name = "gleam_httpc", version = "5.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_http", "gleam_stdlib"], otp_app = "gleam_httpc", source = "hex", outer_checksum = "C545172618D07811494E97AAA4A0FB34DA6F6D0061FDC8041C2F8E3BE2B2E48F" }, ··· 18 19 ] 19 20 20 21 [requirements] 22 + envoy = { version = ">= 1.2.0 and < 2.0.0" } 21 23 gleam_http = { version = ">= 4.3.0 and < 5.0.0" } 22 24 gleam_httpc = { version = ">= 5.0.0 and < 6.0.0" } 23 25 gleam_json = { version = ">= 3.1.0 and < 4.0.0" }
+12
test/possum_test.gleam
··· 1 + import envoy 1 2 import gleam/dict 2 3 import gleam/dynamic 3 4 import gleam/dynamic/decode ··· 6 7 import gleam/json 7 8 import gleam/list 8 9 import gleam/option 10 + import gleam/result 9 11 import gleeunit 10 12 import global_value 11 13 import possum ··· 23 25 Context(handle: String, did: did.Did, pds: String) 24 26 } 25 27 28 + fn context_from_env() -> Result(Context, Nil) { 29 + use handle <- result.try(envoy.get("POSSUM_TEST_HANDLE")) 30 + use pds <- result.try(envoy.get("POSSUM_TEST_PDS")) 31 + use did_string <- result.try(envoy.get("POSSUM_TEST_DID")) 32 + use did <- result.try(did.parse(did_string) |> result.replace_error(Nil)) 33 + 34 + Ok(Context(handle:, did:, pds:)) 35 + } 36 + 26 37 fn global_data() -> Context { 27 38 global_value.create_with_unique_name("possum_test.global.data", fn() { 39 + use <- result.lazy_unwrap(context_from_env()) 28 40 let handle = "bsky.app" 29 41 30 42 let assert Ok(did_response) =