From 1089ac273acb9c631defd235d7d8a920c3397872 Mon Sep 17 00:00:00 2001 From: Florian <45694132+flo-bit@users.noreply.github.com> Date: Sat, 21 Mar 2026 01:06:59 +0100 Subject: [PATCH] update readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fb902c2..673a0a3 100644 --- a/README.md +++ b/README.md @@ -244,11 +244,13 @@ Import the generated types (side-effect import registers them with `@atcute/clie import "./lexicon-types/index.js"; // registers ambient types import { Client } from "@atcute/client"; -const rpc = new Client({ handler: /* your handler */ }); +const rpc = new Client({ handler: simpleFetchHandler({ service: /* your contrail url */ }) }); -const { data } = await rpc.get("community.lexicon.calendar.event.getRecords", { +const response = await rpc.get("community.lexicon.calendar.event.getRecords", { params: { status: "going", limit: 10 }, // typed params }); -data.records // typed as Record[] +if (response.ok) { + console.log(response.data.records); // typed +} ``` -- 2.51.2