Metalove v0.2.2 Metalove View Source

The main application interface.

Link to this section Summary

Functions

Takes a url of a any website (shortform without http(s):// in front is also allowed and tries to follow the redirections, links and html to find a rss feed of a podcast

Convenience entry point. Args:

  • url - URL of a podcast feed or webpage (e.g. "atp.fm" or "https://freakshow.fm/feed/m4a/")

Purges all cached and parsed data

Returns the Metalove version

Link to this section Functions

Link to this function

get_feed_url(url, options \\ []) View Source
get_feed_url(binary(), Keyword.t()) ::
  {:ok, binary()} | {:candidates, [{binary(), binary()}]} | {:error, :not_found}

Takes a url of a any website (shortform without http(s):// in front is also allowed and tries to follow the redirections, links and html to find a rss feed of a podcast.

Args:

  • url - URL of a podcast feed or webpage (e.g. "atp.fm" or "https://freakshow.fm/feed/m4a/")

Return values:

  • {:ok, feed_url} if successful and the header type indicates rss/xml
  • {:candidates, [{potential_url, title},…]} if a html page with multiple links was encountered
  • {:error, :not_found} if we could not dedude any podcast

Examples

iex> {:candidates, list} = Metalove.get_feed_url("freakshow.fm")
iex> hd(list)
{"http://freakshow.fm/feed/mp3", "Podcast Feed: Freak Show (MP3 Audio)"}
Link to this function

get_podcast(url) View Source
get_podcast(binary()) :: Metalove.Podcast.t() | nil

Convenience entry point. Args:

  • url - URL of a podcast feed or webpage (e.g. "atp.fm" or "https://freakshow.fm/feed/m4a/")

Return values:

  • Metalove.Podcast.t() if a podcast could be deduced and fetched from the given url. Metalove will return once one page of a feed has been parsed, but will start parsing all pages of the feed as well as gathering all ID3 metadata if available.
  • nil if no podcast could be found or be associated with the given url

Purges all cached and parsed data.

Returns the Metalove version.