Skip to content

Comments

feat(youtube): add YouTube Data API v3 support#313

Open
satputekuldip wants to merge 1 commit intosteipete:mainfrom
satputekuldip:youtube-feature
Open

feat(youtube): add YouTube Data API v3 support#313
satputekuldip wants to merge 1 commit intosteipete:mainfrom
satputekuldip:youtube-feature

Conversation

@satputekuldip
Copy link

@satputekuldip satputekuldip commented Feb 18, 2026

  • Introduced youtube command group for managing YouTube activities, videos, playlists, comments, and channels.
  • Added configuration options for YouTube API key via youtube_api_key or GOG_YOUTUBE_API_KEY.
  • Updated documentation to reflect new YouTube features and commands.
  • Enhanced CLI help descriptions to include YouTube services.

This commit expands the functionality of the CLI to include comprehensive support for YouTube, allowing users to interact with various YouTube data endpoints.

YouTube

YouTube Data API commands use an API key for public data (by channel/video/playlist ID). For “mine” (your channel, playlists, activities), use OAuth with -a and gog auth add ... --services youtube.

Set an API key (create one in Google Cloud Console after enabling YouTube Data API v3):

gog config set youtube_api_key YOUR_API_KEY
# or
export GOG_YOUTUBE_API_KEY=YOUR_API_KEY
# Activities (channel feed)
gog yt activities list --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw --max 10
gog yt activities list --mine -a you@gmail.com    # OAuth

# Videos
gog yt videos list --id dQw4w9WgXcQ
gog yt videos list --chart mostPopular --region US --max 5

# Playlists
gog yt playlists list --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw
gog yt playlists list --mine -a you@gmail.com   # OAuth

# Comment threads
gog yt comments list --video-id VIDEO_ID --max 20
gog yt comments list --channel-id CHANNEL_ID

# Channels
gog yt channels list --id UC_x5XG1OV2P6uZZ5FSM9Ttw
gog yt channels list --mine -a you@gmail.com    # OAuth

# JSON output
gog yt channels list --id UC_x5XG1OV2P6uZZ5FSM9Ttw --json

- Introduced `youtube` command group for managing YouTube activities, videos, playlists, comments, and channels.
- Added configuration options for YouTube API key via `youtube_api_key` or `GOG_YOUTUBE_API_KEY`.
- Updated documentation to reflect new YouTube features and commands.
- Enhanced CLI help descriptions to include YouTube services.

This commit expands the functionality of the CLI to include comprehensive support for YouTube, allowing users to interact with various YouTube data endpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant