Skip to content

YouTube Discovery Adapter (Phase 2) #5

@bradygaster

Description

@bradygaster

Overview

Implement YouTube Data API v3 adapter to discover Aspire video content, track creator ecosystem, and measure video engagement (views, likes, comments). Unlocks creator influence and tutorial gap signals.

Background

Per gap analysis:

  • Current blind spot: Creator influence at 0% completeness
  • YouTube value: 30-60 videos/month, high-signal source for tutorial quality and content gaps
  • Omar's insight: YouTube drives 65% signal completeness (from 50% in Phase 1)
  • Signal types: Tutorial coverage, creator reach, community engagement, content quality

Requirements

  • Implement YouTubeSourceAdapter extending SourceAdapter interface
  • Use YouTube Data API v3: \search.list\ and \�ideos.list\ endpoints
  • Require \YOUTUBE_API_KEY\ environment variable (validate in adapter.validate())
  • Search query: "dotnet aspire" OR ".net aspire" OR "aspire dotnet"
  • Optional: Track specific channels (e.g., Microsoft Developer, James Montemagno, Nick Chapsas)
  • Extract: video title, channel name, URL, view count, like count, comment count, publish date, description
  • Map to ContentItem type with channel="youtube:{channelName}", source="youtube"
  • Add metadata: { viewCount: number, likeCount: number, commentCount: number, duration: string }\
  • Respect API quota: 10,000 units/day (search = 100 units, videos = 1 unit)
  • Implement quota tracking: log warning if approaching daily limit

Squad SDK Integration

  • Adapter registration: Auto-discovered by SourceRegistry
  • Validation logic: YouTubeSourceAdapter.validate() checks YOUTUBE_API_KEY (fails if missing, blocks adapter)
  • Configuration: Optional channels list in config file (future enhancement)

Acceptance Criteria

  • AC1: Adapter discovers 10+ Aspire videos per run
  • AC2: Each video maps to ContentItem with: id, title, url, author (channel), publishedAt, viewCount, likeCount, commentCount, duration
  • AC3: Videos appear in reports with channel="youtube:{channelName}"
  • AC4: If YOUTUBE_API_KEY is missing, adapter.validate() returns false and adapter is skipped
  • AC5: Quota tracking logs warning when 80% of daily quota consumed
  • AC6: Duplicate videos detected (same video ID = same canonical hash)

Dependencies

Depends on: Issue #1 (Architecture Refactor)

Assigned To

  • Kima (Content scout, video platform experience)

Estimated Effort

1.5 sessions

  • Implement YouTubeSourceAdapter with API key validation
  • Test search queries and quota tracking
  • Validate engagement metrics accuracy

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:freamonAssigned to Freamon (Lead / Editor-in-Chief)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions