A simple library providing programmatic access to the iTunes search API for podcasts.

Overview

A library for searching for podcasts, parsing podcast RSS feeds and obtaining episodes details. Supports searching via iTunes and PodcastIndex (preview).

Usage

Search for podcasts with 'widgets' in the title and find the top podcasts. Both examples limit to 10 results and are set for the United Kingdom:

import 'package:podcast_search/podcast_search.dart';

main() async {
  var search = Search();

  /// Search for podcasts with 'widgets' in the title.
  SearchResult results = await search.search("widgets",
      country: Country.UNITED_KINGDOM,
      limit: 10);

  /// List the name of each podcast found.
  results.items?.forEach((result) {
    print("Found podcast: ${result.trackName}");
  });

  /// Parse the first podcast.
  Podcast podcast = await Podcast.loadFeed(url: results.items[0].feedUrl);

  /// Display episode titles.
  podcast.episodes?.forEach((episode) {
    print("Episode title: ${episode.title}");
  });

  /// Find the top 10 podcasts in the UK.
  var charts = await search.charts(limit: 10, country: Country.UNITED_KINGDOM);

  /// List the name of each podcast found.
  charts.items?.forEach((result) {
    print('Episode title: ${result.trackName}');
  });
}
Comments
  • Add episode image to search

    Add episode image to search

    Love the ease of use on the library. Was hoping to get individual image URL if present added to the list too (or am I doing something wrong that I cannot pick it up?). I think I traced it down to :

    episodes.add(Episode.of(
              item.guid,
              item.title,
              item.description,
              item.link,
              Utils.parseRFC2822Date(item.pubDate),
              item.author ?? item.itunes.author,
              item.itunes?.duration,
              item.enclosure?.url,
              item.itunes?.season,
              item.itunes?.episode));
    

    image

    Do let me know if this is possible, please. If you have any suggestions otherwise, I am keen to learn that too.

    opened by vnl 5
  • Podcast parser is using item level <author> tag as the channel author

    Podcast parser is using item level tag as the channel author

    The RSS parser is looking for either an <author> or <itunes:author> tag in the RSS feed as the channel author; however, <author> is an item level tag which can result in the wrong author begin returned for the podcast.

    To reproduce this, load a podcast that uses item level authors such as 'What Is Money?':

    https://feeds.simplecast.com/MLdpYXYI

    bug 
    opened by amugofjava 4
  • Support podcast index 2.0 value tag

    Support podcast index 2.0 value tag

    This PR adds the "value" tag to podcast item search result as specified by podcast index 2.0 schema (https://github.com/Podcastindex-org/podcast-namespace). The value tag defines the payment model of the item and supports lightning payments. In addition I have modified the _buildSearchUrl method of PodcastIndexSearch to buildSearchUrl so it can be reused by only changing the url and demonstrated a way to use a custom search provider via a unit test. The option of custom search provider is useful when the caller wants to use different API endpoints to search using podcast index and my intention is to use such custom provider when using anytime podcast app as a dependency inside Breez while I am avoiding significant changes to the low level library.

    opened by roeierez 3
  • Implement charts for podcast index

    Implement charts for podcast index

    This PR implements "charts" API for podcast index using trending call. In order to filter trending results the charts API was also modified to get additional query parameters that will be passed to podcast index endpoint. Specifically in Breez we would like to use it to filter those that can be used with lightning payments and for that purpose we will pass "val":"lightning" filter as introduced in the additional test I added. Also a small fix for default 'lastUpdatedTime' was added.

    opened by roeierez 2
  • Unhandled Exception: SocketException: Failed host lookup: 'itunes.apple.com' (OS Error: No address associated with hostname,

    Unhandled Exception: SocketException: Failed host lookup: 'itunes.apple.com' (OS Error: No address associated with hostname,

    I am getting this error after using the example provided. I have checked for internet connection of my device and it seems this library is the only one having issues.

    opened by srihariash999 2
  • Use author instead of ownerName

    Use author instead of ownerName

    I think it is more accurate to get the author from the 'author' property. Also from my research it is always returned in podcast index various search API while ownerName isn't.

    opened by roeierez 0
  • Can the top podcasts be paginated?

    Can the top podcasts be paginated?

    My question is just that, can the top podcasts be paginated? I don't think podcast_search should take care of the pagination aspect but can we just pass in an offset variable that can be used to get a specific page?

    I couldn't find any documentation of that top podcasts api from itunes online so I couldn't confirm if this is even possible? Can you please look this up and let me know? Because it'd be much more useful to get a paginated response from itunes which I can directly use in my app.

    opened by srihariash999 1
  • Podcast fails to load if pubDate is not present on an item

    Podcast fails to load if pubDate is not present on an item

    Hi, At line 295 of model/podcast.dart, you assert that item.pubDate is not null [assignment of Episode.publicationDate as Utils.parseRFC2822Date(item.pubDate!),], but the specification indicates that "<pubDate> is an optional sub-element of <item>." See https://validator.w3.org/feed/docs/rss2.html#hrelementsOfLtitemgt

    https://github.com/amugofjava/podcast_search/blob/026b5b7c54b7c24934f7941feae44ad342c9317d/lib/src/model/podcast.dart#L295

    When the code encounters this, it throws an exception when pubDate is not present on an item.

    The feeds I am having trouble with publish a DublinCore dc:date field for each item, and the W3C RSS validator recommends that a feed only include one of dc:date and pubDate, since there is no official precedence between the fields.

    Thanks!

    bug 
    opened by chrispolley 1
  • Chapter parser needs to handle variations in data format

    Chapter parser needs to handle variations in data format

    The chapters parser will return an empty set of chapters if the JSON file does not match the spec exactly. Whilst chapters should match the spec the parser needs to be tollerant of small variations; specifically handling JSON files that are reported as text/plain rather than application/json and handling numerical time values that are presented as a String.

    opened by amugofjava 0
Releases(v0.2.2)
Owner
Ben Hills
Java & Android developer currently fascinated by Flutter & the Dart language.
Ben Hills
NetcastsOSS - Podcasts (netcasts) consumer app powered by open source software, by Flutter

Netcasts OSS Simple podcasts (netcasts) management powered by open source software Homepage Drawer Explore Discover Podcast Episodes Player Settings W

Mihir Patel 56 Sep 16, 2022
A google browser clone which is made by using flutter and fetching the google search api for the search requests.

google_clone A new Flutter project. Project Preview Getting Started This project is a starting point for a Flutter application. A few resources to get

Priyam Soni 2 May 31, 2022
A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Ably Flutter Plugin A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers sync

Ably Realtime - our client library SDKs and libraries 46 Dec 13, 2022
Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Betterment 14 Nov 28, 2022
This library allows you to create editable tables and spreadsheets with ease, either by providing initial row and column count to display an empty table or use it with predefined rows and column data sets.

Editable ⚡️ A highly customizable, editable table package for Flutter projects. Specs This package allows you to create editable tables and spreadshee

Godwin Asuquo 94 Dec 7, 2022
Github-search - Allows users to search users on github Uses flutter

Github Search Github Search is a cross-platform mobile application powered by Flutter Framework and Github API. The application was built with simplic

Saul 3 Sep 13, 2022
Starlight search bar - Starlight search bar with flutter

starlight_search_bar If you find the easiest way to search your item, this is fo

Ye Myo Aung 1 Apr 20, 2022
A library to help on the search for books on google books api

books_finder A library to help on the search for books on the Google Books Api. Usage First of all, import the library: import 'package:books_finder/b

Bruno D'Luka 18 Nov 6, 2022
Federico 1 Feb 3, 2022
Add Fontsource fonts to your flutter app. Direct access to Fontsource API.

Fontsource for Flutter Add Fontsource fonts to your flutter app. Direct access to Fontsource API. Getting started To start, create a config in either

fontsource 5 Nov 2, 2022
A Flutter plugin for IOS and Android providing a simple way to display PDFs.

Pdf Viewer Plugin A Flutter plugin for IOS and Android providing a simple way to display PDFs. Features: Display PDF. Installation First, add pdf_view

Lucas Britto 56 Sep 26, 2022
Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

❤️ Sponsor get_it This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used

Flutter Community 1k Jan 1, 2023
CoVAC is an all-in-one Covid info toolkit app, providing users the facility to check for available slots along with receiving the latest updates related to the pandemic and the virus.

CoVAC - Covid 19 Vaccine Availability Checker Introduction ?? CoVAC is an android application developed to provide users the facility to check the ava

Aryan Kenchappagol 6 Dec 29, 2021
A Flutter plugin providing signature pad for drawing smooth signatures.

A Flutter plugin providing Signature Pad for drawing smooth signatures. Library is written in pure Dart/Flutter environment to provide support for all

Roman Hornak 79 Dec 21, 2022
Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map.

Custom Radio Group List Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map. Feature

Ashok Kumar Verma 0 Nov 30, 2021
Created application for team to help each other with providing food they want

Food wishes app When you login or create your account, you can write what do you wish right now as a separate card, using "Edit" button. If you no lon

Pavlo Osadchuk 0 Nov 29, 2021
Wraps Flutter shared_preferences plugin, providing a iOS Suite Name support, it's helpful for sharing data from App to Widget.

shared_preferences_ios_sn Wraps Flutter shared_preferences plugin and provides an iOS Suite Name support, it's helpful for sharing data from App to iO

null 3 Sep 14, 2022
A Flutter package providing an easy way to add floating ribbon to images.

Floating Ribbon A new Flutter package for creating floating ribbons on images. Dependency dependencies: floating_ribbon: any How To Use In order to

101Loop 12 Sep 26, 2022
An app that randomly draws Japanese vocabularies from N5 to N1 level to test your listening skill, providing pronunciation and answer checking.

An app that randomly draws Japanese vocabularies from N5 to N1 level to test your listening skill, providing pronunciation and answer checking.

Eric Lau 13 Jul 17, 2022