Skip to content

feat: Add YouTube API key testing in Settings#47

Merged
salvageop merged 4 commits into
CommunityMaintained:masterfrom
profesorabbott:youtube-api-key-test
Jun 18, 2026
Merged

feat: Add YouTube API key testing in Settings#47
salvageop merged 4 commits into
CommunityMaintained:masterfrom
profesorabbott:youtube-api-key-test

Conversation

@profesorabbott

@profesorabbott profesorabbott commented Jun 18, 2026

Copy link
Copy Markdown

What's new?

Allow users to test their YouTube API key directly from the settings page.

What's changed?

Uses a LiveView component that provides visual feedback on whether the key is valid.

What's fixed?

N/A

Other Notes

Copied from PR Add YouTube API key testing in settings from the original branch

ddacunha and others added 4 commits January 18, 2026 21:29
Allow users to test their YouTube API key directly from the settings page
by clicking a button. Uses a LiveView component that provides visual
feedback on whether the key is valid.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add missing test_api_key/1 callback to YoutubeRss module (RSS doesn't
use API keys, so it returns :ok) and fix formatting in YoutubeApi.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous test_api_key/1 tried to decode YouTube's JSON error body, but
HTTPClient.get/3 only returns the body on HTTP 200 and returns {:error, reason}
for any other status, so the error-parsing branches were unreachable. Simplify
to treat a 200 as a valid key and pass the client's status-coded reason through
on failure. Move the test playlist id to a module attribute and add tests for
test_api_key/1 on both the API and RSS clients.
@salvageop salvageop changed the title Add YouTube API key testing in settings feat: Add YouTube API key testing in Settings Jun 18, 2026
@salvageop salvageop merged commit 90303c1 into CommunityMaintained:master Jun 18, 2026
3 checks passed
@salvageop

salvageop commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Hi @profesorabbott , thank you for the contribution! I added a few tests and removed some dead code portion (HTTPClient.get/3 throws away the response body on any non-200 and returns {:error, "HTTP request failed with status code 403: ..."}) and merged it. Looks good!

I'll release once I check your other PRs

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.

3 participants