mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
Fix CI failures for YouTube API key feature
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>
This commit is contained in:
parent
dcee984567
commit
d51ba8bbfd
2 changed files with 12 additions and 1 deletions
|
|
@ -33,7 +33,9 @@ defmodule Pinchflat.FastIndexing.YoutubeApi do
|
|||
# Use a well-known public playlist (YouTube's "Popular Right Now" uploads playlist)
|
||||
# to test if the API key is valid
|
||||
test_playlist_id = "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"
|
||||
url = "https://youtube.googleapis.com/youtube/v3/playlistItems?part=id&maxResults=1&playlistId=#{test_playlist_id}&key=#{api_key}"
|
||||
|
||||
url =
|
||||
"https://youtube.googleapis.com/youtube/v3/playlistItems?part=id&maxResults=1&playlistId=#{test_playlist_id}&key=#{api_key}"
|
||||
|
||||
case http_client().get(url, accept: "application/json") do
|
||||
{:ok, response} ->
|
||||
|
|
|
|||
|
|
@ -19,6 +19,15 @@ defmodule Pinchflat.FastIndexing.YoutubeRss do
|
|||
@impl YoutubeBehaviour
|
||||
def enabled?(), do: true
|
||||
|
||||
@doc """
|
||||
RSS feeds don't use API keys, so this always returns :ok.
|
||||
Used to satisfy the `YoutubeBehaviour` behaviour.
|
||||
|
||||
Returns :ok
|
||||
"""
|
||||
@impl YoutubeBehaviour
|
||||
def test_api_key(_api_key), do: :ok
|
||||
|
||||
@doc """
|
||||
Fetches the recent media IDs from a YouTube RSS feed for a given source.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue