From db5375038e77d230986ad297bd2ab3bc88137472 Mon Sep 17 00:00:00 2001 From: ibrahim Date: Sat, 31 Oct 2026 15:44:50 -0300 Subject: [PATCH] docs(router): add Python and TypeScript SDK tabs to search.mdx --- docs/router/search.mdx | 58 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/docs/router/search.mdx b/docs/router/search.mdx index 007fc8fa..8a638776 100644 --- a/docs/router/search.mdx +++ b/docs/router/search.mdx @@ -37,10 +37,30 @@ Authorization: Bearer pmxt_live_... ## Events shape -```bash -curl "https://api.pmxt.dev/v0/events?query=election&limit=2" \ - -H "Authorization: Bearer pmxt_live_..." -``` + + + ```python + import pmxt + + router = pmxt.Router(pmxt_api_key="pmxt_live_...") + + # GET /v0/events?query=election&limit=2 + # Also supported: offset, and status="closed" to include closed rows. + events = router.fetch_events(query="election", limit=2) + ``` + + + ```typescript + import pmxt from "pmxtjs"; + + const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." }); + + // GET /v0/events?query=election&limit=2 + // Also supported: offset, and status: "closed" to include closed rows. + const events = await router.fetchEvents({ query: "election", limit: 2 }); + ``` + + ```json { @@ -69,10 +89,32 @@ Exactly the same shape as [`UnifiedEvent`](/concepts/unified-schema#unifiedevent ## Markets shape -```bash -curl "https://api.pmxt.dev/v0/markets?query=election&limit=3" \ - -H "Authorization: Bearer pmxt_live_..." -``` + + + ```python + import pmxt + + router = pmxt.Router(pmxt_api_key="pmxt_live_...") + + # GET /v0/markets?query=election&limit=3 + # Also supported: offset, category, exchange; use status="closed" + # to include closed rows. + markets = router.fetch_markets(query="election", limit=3) + ``` + + + ```typescript + import pmxt from "pmxtjs"; + + const router = new pmxt.Router({ pmxtApiKey: "pmxt_live_..." }); + + // GET /v0/markets?query=election&limit=3 + // Also supported: offset, category, exchange; use status: "closed" + // to include closed rows. + const markets = await router.fetchMarkets({ query: "election", limit: 3 }); + ``` + + ```json {