Feed aggregator for Elixir.
Installation
First, add RaSStaggregator to your mix.exs dependencies:
def deps do
[{:rasstaggregator, "~> 1.0"}]
end
and run $ mix deps.get. Now, list the :rasstaggregator application as your
application dependency:
def application do
[applications: [:rasstaggregator]]
endUsage
The RaSStaggregator will read the list of feeds from the configuration value:
config :rasstaggregator, feeds: [
%RaSStaggregator.Feed{id: :example_feed, url: "http://example.com/feed"},
%RaSStaggregator.Feed{id: :another_feed, url: "http://example.com/another_feed"},
%RaSStaggregator.Feed{id: :yet_another_feed, url: "http://example.com/yet_another_feed"},
]It is also possible to add a feed programatically:
RaSStaggregator.add_feed :feed_id, "http://example.com/feed"RaSStaggregator will start a parser for each feed and periodically check them and store them into ETS. It is easy to get the list of feed entries from it:
entries = RaSStaggregator.Cache.find(:feed_id)or to get the post timeline consisting out of multiple feeds:
timeline = RaSStaggregator.get_timeline([:feed_id_1, :feed_id_2, ...])