rss_sync v0.2.0 RssSync.Storage

Summary

Functions

Returns all feeds currently stored on the Agent

Takes an RSS feed URL and deletes the corresponding feed on the Agent. Returns :ok

Takes an arbitrary term, searches for it in the metadata of each feed and returns the first matching feed in the format {url, {meta, entries}}

Takes no argument, stores the current state of the Storage Agent on disk, and returns :ok

Takes a pair {rss_feed_url, {meta, entries}} stores it on the Agent, and returns :ok

Starts the Storage Agent. This should only be called from a Supervisor

Types

entry :: %RssSync.Feed.Entry{author: term, duration: term, enclosure: term, id: term, image: term, link: term, subtitle: term, summary: term, title: term, updated: term}
meta :: %RssSync.Feed.Meta{author: term, id: term, image: term, language: term, link: term, subtitle: term, summary: term, title: term, updated: term}

Functions

all()

Specs

all :: [{url, {meta, entry}}] | []

Returns all feeds currently stored on the Agent.

del(feed_url)

Specs

del(url) :: :ok

Takes an RSS feed URL and deletes the corresponding feed on the Agent. Returns :ok.

find(meta_value)

Specs

find(any) :: {url, {meta, [entry]}} | atom

Takes an arbitrary term, searches for it in the metadata of each feed and returns the first matching feed in the format {url, {meta, entries}}.

persist()

Takes no argument, stores the current state of the Storage Agent on disk, and returns :ok.

put(feed_pair)

Specs

put({url, {meta, [entry]}}) :: :ok

Takes a pair {rss_feed_url, {meta, entries}} stores it on the Agent, and returns :ok.

start_link()

Specs

start_link :: {:error, term} | {:ok, pid}

Starts the Storage Agent. This should only be called from a Supervisor.