podcast_search 0.2.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

A package combining both searching for podcasts via iTunes and the processing of podcast feeds providing object access to the feed, podcast and episode details.

Usage #

A simple usage example. Search for podcasts with widgets in the title and is available in the UK. Limit to at most 10 results:

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}");
  });
}

0.2.5 #

  • Updated to latest test package to support Dart 2.6+.

0.2.4 #

  • Added guid to Episode entity.

0.2.3 #

  • Added missing format from list of possible pubdate formats.

0.2.2 #

  • Dropped version of Meta to prevent clash with current SDK.

0.2.1 #

  • Corrected issue with dependencies.

0.2.0 #

  • Breaking change: Renamed Podcast to Item in search results.
  • Added support for parsing a podcast RSS feed and returning podcast and episodes details.

0.1.2 #

  • Correct copyright text to fix issues with documentation.

0.1.1 #

  • Correct issues reported by health tool.

0.1.0 #

  • Initial release.

example/podcast_search_example.dart

import 'package:podcast_search/podcast_search.dart';

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

  /// Search for the "It's a Widget" podcast.
  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}");
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  podcast_search: ^0.2.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:podcast_search/podcast_search.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Nov 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:podcast_search/podcast_search.dart.

Health issues and suggestions

Document public APIs. (-0.13 points)

324 out of 334 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/search/search.dart.

Run dartfmt to format lib/src/search/search.dart.

Format lib/src/utils/utils.dart.

Run dartfmt to format lib/src/utils/utils.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
http ^0.12.0+1 0.12.0+2
meta ^1.1.6 1.1.8
webfeed ^0.4.2 0.4.2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
http_parser 3.1.3
path 1.6.4
pedantic 1.8.0+1
petitparser 2.4.0
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
xml 3.5.0
Dev dependencies
test ^1.9.4