RssWatcher v0.1.1 RssWatcher.Subscription View Source

The logical A RssWatcher.Subscription fetches, parses, and dispatches updates for RSS feeds.

This module should not be used directly, and instead rely on RssWatcher configuration for initialization and use.

Link to this section Summary

Functions

Dispatches all pending updates for a subscription.

Finds updated items for a subscription, and stores them as pending updates.

Generates a new subscription

Link to this section Types

Link to this type

callback() View Source
callback() :: (... -> any()) | {module(), atom(), list()}

Link to this type

recent_item() View Source
recent_item() :: {NaiveDateTime.t() | DateTime.t(), String.t()}

Link to this type

t() View Source
t() :: %RssWatcher.Subscription{
  callback: callback(),
  http_client: module(),
  http_client_options: [],
  pending_updates: list(),
  recent_items: [recent_item()],
  refresh_interval: integer(),
  rss_parser: module(),
  rss_parser_options: [],
  updated_at: NaiveDateTime.t() | DateTime.t(),
  url: String.t()
}

Link to this section Functions

Link to this function

dispatch_pending(subscription) View Source (since 0.1.0)
dispatch_pending(t()) :: t()

Dispatches all pending updates for a subscription.

Link to this function

find_updates(subscription) View Source (since 0.1.0)
find_updates(t()) :: {:ok, t()} | {:error, term()}

Finds updated items for a subscription, and stores them as pending updates.

Link to this function

new(url, fun, opts \\ []) View Source (since 0.1.0)
new(String.t(), callback(), options()) :: t()

Generates a new subscription