Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #67 merged: feat: YouTube Data API v3 fetcher and sources

Summary

Adds a YouTube Data API v3 fetcher to the DevTrends firehose pipeline.

Changes

app/Services/Fetchers/YouTubeApiFetcher.php (new)

  • Extends BaseFetcher
  • Two-phase fetch: search.list to find videos, then videos.list (batched) for full stats
  • Each source's endpoint_url is the search query string
  • Rolling 7-day publishedAfter window
  • Configurable maxResults (default 25)
  • Normalizes to standard format: external_id, url, title, content (description), content_type='video'
  • raw_json includes: channel_id, channel_title, description, published_at, view_count, like_count, comment_count, tags, search_query
  • Reads API key from config('services.youtube.api_key') / YOUTUBE_API_KEY env

database/migrations/2026_03_26_000000_add_youtube_api_sources.php (new)

15 sources covering: AI coding tools, AI agents, LLM programming, Laravel 2026, React, Next.js, TypeScript, Rust, DevOps/Kubernetes, developer tools, open source, Claude Code AI, web dev trends, software architecture, coding tutorials

app/Console/Commands/FetchFirehoseCommand.php

  • Added use App\Services\Fetchers\YouTubeApiFetcher;
  • Added 'youtube_api' => YouTubeApiFetcher::class to $fetcherMap

config/services.php

  • Added youtube.api_key entry reading YOUTUBE_API_KEY env var

Setup Required

Set YOUTUBE_API_KEY in your .env file with a valid YouTube Data API v3 key, then run:

php artisan migrate
+472
additions
-0
deletions
5
files changed