linktree-sdk-patterns

Featured

Sdk Patterns for Linktree. Trigger: "linktree sdk patterns".

AI & Automation 2,266 stars 315 forks Updated today 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

# Linktree SDK Patterns ## Overview Linktree's REST API exposes profile management, link CRUD, click analytics, and appearance theming through bearer-token authentication. A structured SDK client matters here because Linktree enforces strict per-minute rate limits on analytics endpoints and returns nested profile objects that benefit from strong typing. These patterns provide a thread-safe singleton, typed error classification, fluent request building for paginated link lists, and test utilities for mocking profile and analytics responses. ## Prerequisites - Node.js 18+, TypeScript 5+ - `LINKTREE_API_KEY` environment variable (generated in Linktree admin > Settings > Developer) - `axios` or `node-fetch` for HTTP transport ## Singleton Client ```typescript interface LinktreeConfig { apiKey: string; baseUrl?: string; timeout?: number; } let client: LinktreeClient | null = null; export function getLinktreeClient(overrides?: Partial<LinktreeConfig>): LinktreeClient { if (!client) { const config: LinktreeConfig = { apiKey: process.env.LINKTREE_API_KEY ?? '', baseUrl: 'https://api.linktr.ee/v1', timeout: 10_000, ...overrides, }; if (!config.apiKey) throw new Error('LINKTREE_API_KEY is required'); client = new LinktreeClient(config); } return client; } ``` ## Error Wrapper ```typescript interface LinktreeError { status: number; code: string; detail: string; } async function safeLinktree<T>(fn: () => Promise<T>): Promise<T> {...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category