eof_podcast_feed 1.0.0

dart-eof-podcast-feed #

Dart EOF Podcast Feed is a Open Source library available at https://github.com/luizeof/dart-eof-podcast-feed to parse Podcast Feed.

Pub

Features #

  • Parse a Podcast Feed with Name, URL, Copyright, Author, Cover and Description.
  • Parse a Episode from Feed with Title, Cover, Media URL, Date and Description.

Getting started #

import 'package:eof_podcast_feed/eof_podcast_feed.dart';

The EOFPodcast class has a static method fromFeed that return a EOFPodcast object.

void main() async {

  // Start the Object with `fromFeed` static method
  var podcast =
      await EOFPodcast.fromFeed('https://FEEDURL');

  // You can access the Podcast Details
  print('Podcast Autor: ' + podcast.author);
  print('Podcast Title: ' + podcast.title);
  print('Podcast Link: ' + podcast.url);
  print('Podcast Has Episode: ' + podcast.hasEpisodes.toString());
  print('Podcast Episode Count: ' + podcast.countEpisodes.toString());
  print('Podcast Playback: ' + podcast.playbackState.toString());

You can access a List of EOFEpisode on podcast.episodes property:

  // And navigate on Episodes List
  var episode = podcast.episodes.first;

  print('Episode Title: ' + episode.title);
  print('Episode Description: ' + episode.description);
  print('Episode PubDate: ' + episode.pubDate);
  print('Episode Url: ' + episode.url);
  print('Episode Cover: ' + episode.cover);
  print('Episode Playback: ' + episode.playbackState.toString());

}

Changelog #

Please see the Changelog page to know what's recently changed.

Contributions #

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.

If you fixed a bug or implemented a feature, please send a pull request.

Coding Style #

Follow the Default Code Style and use the Dart Analizer tool:

dartanalyzer --options analysis_options.yaml .

The production Dart Analizer log is here.

Changelog #

1.0.0 #

  • Podcast Class
  • Feed Class

example/example.dart

import '../lib/eof_podcast_feed.dart';

void main() async {
  var podcast =
      await EOFPodcast.fromFeed('https://anchor.fm/s/848f2e4/podcast/rss');

  print('Podcast Autor: ' + podcast.author);
  print('Podcast Title: ' + podcast.title);
  print('Podcast Link: ' + podcast.url);
  print('Podcast Has Episode: ' + podcast.hasEpisodes.toString());
  print('Podcast Episode Count: ' + podcast.countEpisodes.toString());
  print('Podcast Playback: ' + podcast.playbackState.toString());

  var episode = podcast.episodes.first;

  print('Episode Title: ' + episode.title);
  print('Episode Description: ' + episode.description);
  print('Episode PubDate: ' + episode.pubDate);
  print('Episode Url: ' + episode.url);
  print('Episode Cover: ' + episode.cover);
  print('Episode Playback: ' + episode.playbackState.toString());
}

Use this package as a library

1. Depend on it

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


dependencies:
  eof_podcast_feed: ^1.0.0

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:eof_podcast_feed/eof_podcast_feed.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
15
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]
58
Learn more about scoring.

We analyzed this package on Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.0+3 0.12.0+4
xml ^3.7.0 3.7.0
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.12
convert 2.1.1
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
petitparser 3.0.1
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.9.0