Communitygithub.com

jeremylongshore/tons-of-skills-marketplace

設定 AppFolio Stack API 的 OAuth 2.0 驗證。用於建立物業管理 API 存取、註冊為 AppFolio Stack 合作夥伴,或設定 API 呼叫的用戶端憑證。

tons-of-skills-marketplace 是什麼?

這是一個專為開發者設計的 AI 助手技能,用於快速設定 AppFolio Stack API 的驗證機制。AppFolio 採用 HTTP Basic Auth,搭配用戶端 ID 和用戶端密碼,透過其 Stack 合作夥伴計畫提供。由於沒有公開的 npm SDK,此技能引導使用者直接使用 REST API 呼叫。支援 Node.js 18+ 和 Python 3.10+ 平台,並提供 TypeScript REST 用戶端範例、連接驗證指令,以及常見錯誤的解決方法。透過此技能,開發者可以安全地將憑證注入至機密管理系統,並快速驗證 API 連線是否成功。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/saas-packs/appfolio-pack/skills/appfolio-install-auth

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

AppFolio 安裝與驗證

總覽

設定 AppFolio Stack API 驗證。AppFolio 使用 HTTP Basic Auth,搭配用戶端 ID 和用戶端密碼,透過其 Stack 合作夥伴計畫提供。沒有公開的 npm SDK — 請直接使用 REST API 呼叫。

先決條件

  • AppFolio Stack 合作夥伴帳戶 (appfolio.com/stack)
  • 來自 AppFolio 的用戶端 ID 和用戶端密碼
  • Node.js 18+ 或 Python 3.10+

操作說明

步驟 1:取得 API 憑證

# AppFolio Stack API 憑證來自合作夥伴計畫
# 1. 在 appfolio.com/stack/become-a-partner 申請
# 2. 完成整合審查
# 3. 接收提供者核發的基礎 URL 和憑證傳遞說明。
# 將值存放於核准的機密管理器中。若需要本地開發,請僅提交此非機密範本:
cat > .env.example << 'ENVFILE'
APPFOLIO_CLIENT_ID=
APPFOLIO_CLIENT_SECRET=
APPFOLIO_BASE_URL=
ENVFILE

# .env 保持忽略;僅透過核准的本地機密流程來填入。

步驟 2:建立 API 用戶端

// src/appfolio-client.ts
import axios, { AxiosInstance } from 'axios';

class AppFolioClient {
  private api: AxiosInstance;

  constructor() {
    this.api = axios.create({
      baseURL: process.env.APPFOLIO_BASE_URL,
      auth: {
        username: process.env.APPFOLIO_CLIENT_ID!,
        password: process.env.APPFOLIO_CLIENT_SECRET!,
      },
      headers: { 'Content-Type': 'application/json' },
      timeout: 30000,
    });
  }

  async verifyConnection(): Promise<boolean> {
    try {
      const response = await this.api.get('/properties');
      console.log(`已連線!找到 ${response.data.length} 個物業`);
      return true;
    } catch (error: any) {
      console.error(`連線失敗:${error.response?.status} ${error.message}`);
      return false;
    }
  }

  get http(): AxiosInstance { return this.api; }
}

export { AppFolioClient };

步驟 3:驗證連線

# 快速、遮罩的診斷,不在 argv 中放入 Basic Auth。
NETRC_FILE="$(mktemp)"
trap 'rm -f "$NETRC_FILE"' EXIT
chmod 600 "$NETRC_FILE"
APPFOLIO_HOST="${APPFOLIO_BASE_URL#https://}"
APPFOLIO_HOST="${APPFOLIO_HOST%%/*}"
printf 'machine %s login %s password %s\n' "$APPFOLIO_HOST" \
  "$APPFOLIO_CLIENT_ID" "$APPFOLIO_CLIENT_SECRET" > "$NETRC_FILE"
curl -s -o /dev/null -w '%{http_code}\n' --netrc-file "$NETRC_FILE" \
  "${APPFOLIO_BASE_URL}/properties"

API 端點

資源端點方法
物業/api/v1/propertiesGET
單位/api/v1/unitsGET
租戶/api/v1/tenantsGET
租約/api/v1/leasesGET, POST
帳單/api/v1/billsGET, POST
供應商/api/v1/vendorsGET
業主/api/v1/ownersGET
報表/api/v1/reportsGET

輸出

  • 透過核准的機密邊界注入提供者核發的憑證
  • 帶有 Basic Auth 的 TypeScript REST 用戶端
  • 對核准的唯讀端點進行遮罩式連線結果

範例

若要進行首次驗證排練,請透過本地機密機制注入沙箱憑證和提供者核發的基礎 URL,然後對核准的合成物業頁面發送一次唯讀請求。僅記錄狀態碼和用戶端配置判斷結果;請勿在共享日誌中列印物業承載、用戶端 ID、密碼或完整的 host/path。如果合約、基礎 URL、機密繫結或狀態結果未經驗證,請在執行任何寫入工作流程之前停止,並讓憑證擁有者修正配置。

錯誤處理

錯誤原因解決方案
401 Unauthorized無效憑證驗證來自 AppFolio 的 client_id/secret
403 Forbidden非 Stack 合作夥伴完成合作夥伴申請
404 Not Found基礎 URL 錯誤使用 your-company.appfolio.com 格式
逾時網路問題檢查防火牆是否允許 HTTPS 到 appfolio.com

資源

後續步驟

前往 appfolio-hello-world 進行你的首次物業查詢。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Runs the full release workflow for the current project. Commits any uncommitted changes, pushes to remote, creates and merges a PR if on a feature branch, determines the next semver version from conventional commits, creates an annotated git tag and GitHub release with generated notes, cleans up merged branches, and returns to a clean main. Use when the user says promote, ship, release, commit and push, tag and release, or get back to main.

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Build property management dashboard with AppFolio API data. Trigger: "appfolio property dashboard".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

jeremylongshore/tons-of-skills-marketplace

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio patterns".

相關技能