enhancementgood first issueintegrationnew-featurenew-integration
Metriche repository
- Star
- (1930 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Description
Add Tripadvisor integration to sync travel review data including location details, reviews, ratings, and travel content into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/github/- API-based data integrationintegrations/linear/- Project management integrationintegrations/slack/- For reference
Required Files Structure
integrations/tripadvisor/
├── src/
│ ├── index.ts # Main entry, API key spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Tripadvisor Content API utilities
│ ├── account-create.ts # API key setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Tripadvisor Content API Integration
Authentication Setup
- Use API Key authentication
- Register at Tripadvisor Developer Portal and subscribe to pay-as-you-go plan
- First 5,000 API calls free per month
- API key provided after subscription setup
Key Endpoints
GET /location/{locationId}/details- Get location details (name, address, rating, reviews count)GET /location/{locationId}/reviews- Get reviews for a locationGET /location/{locationId}/photos- Get photos for a locationGET /location/search- Search for locations by keywordGET /location/nearby- Find nearby locationsGET /location/{locationId}/tips- Get travel tips
Location Types
- Hotels, Restaurants, Attractions, Destinations
- Data available in 29 languages
- Over 7.5 million locations and 1 billion reviews
Events to Track
- Location Data - Location details, ratings, and metadata
- Reviews - New reviews, rating changes, review responses
- Photos - User-submitted photos and media
- Search Results - Location search queries and results
- Nearby Locations - Geographic proximity-based discoveries
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement API key authentication flow in
account-create.ts - Create API utilities in
utils.tsfor locations, reviews, photos, and search - Implement sync logic in
schedule.tsfor polling location and review data - Convert review/location data to CORE activity format
- Add error handling and rate limiting (50 calls/sec dev, 10K/day production)
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Free tier: 5,000 API calls/month, then pay-as-you-go pricing
- Development rate limit: 50 calls/second, 1,000 calls/day
- Production rate limit: 10,000 calls/day (after app approval)
- Data available in 29 languages - pass language parameter for localization
- Location IDs are the primary key for accessing all content
- Review data includes overall rating, sub-ratings, text, and reviewer info
- Consider caching location details to minimize API calls
Resources
Labels
enhancement, integration, new-feature