mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
feat(events): Phase 4 — provider adapters for Eventbrite + Meetup
- Add EventProvider interface (base.ts) with fetchEvents(url, name, ctx, config) - Refactor iCal parser and website extractor as provider adapters - Add Eventbrite provider: API v3 search by location, category mapping, price info extraction. Requires EVENTBRITE_API_KEY env var. - Add Meetup provider: GraphQL API search by location, topic→category mapping, HTML stripping. Requires MEETUP_API_KEY env var. - Provider registry (getProvider, PROVIDER_TYPES) replaces hardcoded switch in crawl-scheduler - Crawl scheduler now joins sources with regions for ProviderContext (lat/lon/radius/label) — platform providers need this for geo-search - Source creation accepts 'eventbrite' and 'meetup' types (url optional) - Both providers gracefully return empty when API keys unconfigured 116 tests (all passing), no regressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4d82381737
commit
ed801cf725
13 changed files with 708 additions and 44 deletions
|
|
@ -95,8 +95,8 @@ export async function getSources(): Promise<DiscoverySource[]> {
|
|||
}
|
||||
|
||||
export async function createSource(input: {
|
||||
type: 'ical' | 'website';
|
||||
url: string;
|
||||
type: 'ical' | 'website' | 'eventbrite' | 'meetup';
|
||||
url?: string;
|
||||
name: string;
|
||||
regionId: string;
|
||||
crawlIntervalHours?: number;
|
||||
|
|
|
|||
|
|
@ -20,9 +20,11 @@ export interface DiscoveryInterest {
|
|||
createdAt: string;
|
||||
}
|
||||
|
||||
export type SourceType = 'ical' | 'website' | 'eventbrite' | 'meetup';
|
||||
|
||||
export interface DiscoverySource {
|
||||
id: string;
|
||||
type: 'ical' | 'website';
|
||||
type: SourceType;
|
||||
url: string | null;
|
||||
name: string;
|
||||
regionId: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue