Serve the latest YouTube uploads at /api/videos - #524
Open
shanerbaner82 wants to merge 1 commit into
Open
shanerbaner82 wants to merge 1 commit into
shanerbaner82 wants to merge 1 commit into
Conversation
The Jump app's Videos tab read the channel RSS feed at youtube.com/feeds, which now returns 404 for every channel. Serve the list from here instead, via the YouTube Data API's uploads playlist for @NativePHPOfficial. Cached for an hour; the last good list is kept so a YouTube failure serves stale videos rather than an empty tab. Needs YOUTUBE_API_KEY; without it the endpoint returns an empty list and makes no request. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
simonhamp
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Jump app's Videos tab loads the YouTube channel RSS feed (
youtube.com/feeds/videos.xml?channel_id=…). That endpoint now returns 404 for every channel, so the tab shows "Unable to load videos". This gives the app a source we control.What
GET /api/videos: public, throttled to 60/min,Cache-Control: public, max-age=900.{ "data": [ { "id", "title", "description", "published_at", "thumbnail", "url" } ] }YouTubeVideoServicereads the uploads playlist for @NativePHPOfficial (UUbkAE6vLlR6lOy_nxd--22g) through the YouTube Data API v3playlistItemsendpoint: the latest 25, with private and deleted uploads dropped.Deploy
Set
YOUTUBE_API_KEYin production: a Google Cloud API key with the YouTube Data API v3 enabled. Without it the endpoint returns{"data": []}and makes no request.YOUTUBE_CHANNEL_IDis optional and defaults to @NativePHPOfficial.Tests
tests/Feature/Api/VideosTest.phpcovers mapping, caching, the stale fallback, and the missing-key case.🤖 Generated with Claude Code