From appfolio-pack
Migrates AppFolio API integrations between v1/v2, adapting endpoints like v2 pagination via TypeScript adapters. Trigger: 'appfolio upgrade'.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin appfolio-packThis skill is limited to using the following tools:
```typescript
Queries AppFolio properties, units, and tenants via REST API. Manual trigger: 'appfolio hello world'. Includes error handling for common API issues.
Guides Documenso API v1 to v2 upgrades and TypeScript/Python SDK migrations with code examples and bash commands.
Migrates ClickUp API from v2 to v3: audits endpoints with bash, maps terminology changes like team to workspace, and builds TypeScript adapters for tasks/spaces.
Share bugs, ideas, or general feedback.
// Adapter pattern for API version changes
class AppFolioVersionAdapter {
private version: "v1" | "v2";
private client: any;
constructor(version: "v1" | "v2" = "v1") {
this.version = version;
}
async getProperties(): Promise<any[]> {
if (this.version === "v2") {
// v2 may return paginated results
return this.paginatedGet("/properties");
}
return (await this.client.get("/properties")).data;
}
private async paginatedGet(path: string): Promise<any[]> {
const results: any[] = [];
let cursor: string | null = null;
do {
const { data } = await this.client.get(path, { params: { cursor } });
results.push(...data.results);
cursor = data.next_cursor;
} while (cursor);
return results;
}
}