feat: implement podcastIndexService using iTunes API for search and trending podcasts

This commit is contained in:
Michael committed 2026-04-16 15:03:10 +02:00
1 parent a993e2d658
commit e01b661aa2
7 files changed
+425 -139

No files matched your search

+6 -2
View File
@@ -59,14 +59,18 @@ export const podcastIndexService = {
query: string,
limit: number = 20,
): Promise<SearchResult[]> => {
const term = query.trim();
if (!term) return [];
const response = await axios.get<ItunesSearchResponse>(
'https://itunes.apple.com/search',
{
params: {
term: query,
term,
media: 'podcast',
entity: 'podcast',
limit: Math.min(limit, 50),
country: 'FR', // Prioritize French store
limit: Math.max(limit, 50), // Get more results to find the best match
},
timeout: 10000,
}