apollo-sdk-patterns

Featured

Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".

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

# Apollo SDK Patterns ## Overview Production-ready patterns for Apollo.io API integration. Apollo has no official SDK — these patterns wrap the REST API (`https://api.apollo.io/api/v1/`) with type safety, retry logic, pagination, and bulk operations. All requests use the `x-api-key` header. ## Prerequisites - Completed `apollo-install-auth` setup - TypeScript 5+ with strict mode ## Instructions ### Step 1: Type-Safe Client with Zod Validation ```typescript // src/apollo/client.ts import axios, { AxiosInstance } from 'axios'; import { z } from 'zod'; const ConfigSchema = z.object({ apiKey: z.string().min(10, 'API key too short'), baseURL: z.string().url().default('https://api.apollo.io/api/v1'), timeout: z.number().default(30_000), }); let instance: AxiosInstance | null = null; export function getApolloClient(config?: Partial<z.input<typeof ConfigSchema>>): AxiosInstance { if (instance) return instance; const parsed = ConfigSchema.parse({ apiKey: config?.apiKey ?? process.env.APOLLO_API_KEY, ...config, }); instance = axios.create({ baseURL: parsed.baseURL, timeout: parsed.timeout, headers: { 'Content-Type': 'application/json', 'x-api-key': parsed.apiKey, }, }); return instance; } // Reset for testing export function resetClient() { instance = null; } ``` ### Step 2: Custom Error Classes ```typescript // src/apollo/errors.ts import { AxiosError } from 'axios'; export class ApolloApiError extends Error { constr...

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