attio-sdk-patterns

Featured

Production-ready patterns for the Attio REST API: typed client, retry with backoff, pagination iterators, and multi-tenant factory. Trigger: "attio SDK patterns", "attio best practices", "attio client wrapper", "idiomatic attio", "attio TypeScript patterns".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Attio SDK Patterns ## Overview There is no official Attio Node.js SDK. The API is a clean REST/JSON interface at `https://api.attio.com/v2`. These patterns wrap `fetch` into a production-grade typed client with retry, pagination, and error normalization. ## Prerequisites - Node.js 18+ (native `fetch`) - TypeScript 5+ - Completed `attio-install-auth` ## Instructions ### Pattern 1: Typed Client with Error Normalization ```typescript // src/attio/client.ts const ATTIO_BASE = "https://api.attio.com/v2"; export class AttioApiError extends Error { constructor( public statusCode: number, public type: string, public code: string, message: string ) { super(message); this.name = "AttioApiError"; } get retryable(): boolean { return this.statusCode === 429 || this.statusCode >= 500; } } export class AttioClient { constructor(private apiKey: string) {} async request<T>( method: string, path: string, body?: Record<string, unknown> ): Promise<T> { const res = await fetch(`${ATTIO_BASE}${path}`, { method, headers: { Authorization: `Bearer ${this.apiKey}`, "Content-Type": "application/json", }, body: body ? JSON.stringify(body) : undefined, }); if (!res.ok) { const err = await res.json().catch(() => ({})); throw new AttioApiError( res.status, err.type || "unknown", err.code || "unknown", err.message || `HTTP ${res.status}` ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category