appfolio-sdk-patterns

Featured

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio 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

# AppFolio SDK Patterns ## Overview Production-ready patterns for the AppFolio property management REST API. AppFolio uses HTTP Basic Auth with client credentials and returns JSON responses for properties, tenants, leases, and work orders. A structured singleton client prevents credential sprawl, enforces consistent error handling, and centralizes pagination logic across all property management endpoints. ## Singleton Client ```typescript import axios, { AxiosInstance } from 'axios'; let _client: AxiosInstance | null = null; export function getClient(): AxiosInstance { if (!_client) { const clientId = process.env.APPFOLIO_CLIENT_ID; const clientSecret = process.env.APPFOLIO_CLIENT_SECRET; const baseURL = process.env.APPFOLIO_BASE_URL; if (!clientId || !clientSecret || !baseURL) throw new Error('APPFOLIO_CLIENT_ID, SECRET, and BASE_URL required'); _client = axios.create({ baseURL, auth: { username: clientId, password: clientSecret }, timeout: 30000 }); } return _client; } ``` ## Error Wrapper ```typescript export class AppFolioError extends Error { constructor(public status: number, public code: string, message: string) { super(message); } } export async function safeCall<T>(operation: string, fn: () => Promise<T>): Promise<T> { try { return await fn(); } catch (err: any) { const status = err.response?.status ?? 0; if (status === 429) { await new Promise(r => setTimeout(r, 5000)); return fn(); } if (status === 401) throw new AppFo...

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