RedPlanetHQ/core

New Integration: Splitwise

開放

#479 建立於 2026年2月24日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (184 個分叉)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

倉庫指標

星標
 (1,930 顆星)
PR 合併指標
 (平均合併 3小時 2分鐘) (30 天內合併 10 個 PR)

描述

Description

Add Splitwise integration to sync expense sharing data including groups, expenses, balances, and settlement activity into CORE.

Reference Implementations

Existing Integrations (use as templates)

  • integrations/hubspot/ - Similar data sync system
  • integrations/linear/ - Project management integration
  • integrations/slack/ - For reference

Required Files Structure

integrations/splitwise/
├── src/
│   ├── index.ts          # Main entry, OAuth spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # Splitwise API utilities
│   ├── account-create.ts # OAuth setup
│   └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md

Splitwise API Integration

OAuth Setup

  • Use OAuth 2.0 authorization code flow
  • API follows OpenAPI v3 specification
  • Base URL: https://secure.splitwise.com/api/v3.0
  • Developer portal: https://dev.splitwise.com/

Key Endpoints

  • GET /get_current_user - Get current user info
  • GET /get_groups - List groups
  • GET /get_group/{id} - Get group details
  • GET /get_expenses - List expenses
  • GET /get_expense/{id} - Get expense details
  • POST /create_expense - Create an expense
  • GET /get_friends - List friends
  • GET /get_notifications - Get notifications
  • GET /get_comments - Get comments on an expense

Events to Track

  1. Expenses - Expense created, expense updated, expense deleted, expense split
  2. Groups - Group created, member added, member removed
  3. Settlements - Payment made, debt settled
  4. Comments - Comment added to expense
  5. Notifications - New notifications and activity

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement OAuth 2.0 flow in account-create.ts
  • Create API utilities in utils.ts for Splitwise API calls
  • Implement sync logic in schedule.ts for expenses, groups, and settlements
  • Convert expense events to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • Self-Serve API has conservative rate and access limits (subject to change)
  • Recommended for non-commercial plugin applications and personal projects
  • For commercial use, contact developers@splitwise.com
  • API docs built with Redoc following OpenAPI v3 spec
  • Unofficial third-party SDKs available in various languages

Resources

Labels

enhancement, integration, new-feature

貢獻者指南