Skip to content
Wrapper for the fetcher part of the ROME suite for feed parsing
Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/clj_rome
test/clj_rome/test
.gitignore
README.md
project.clj

README.md

clj-rome

A simple Clojure wrapper for the ROME fetcher, to be used with clj-rome.

Installation

clj-rome is available as a Maven artifact from Clojars:

[clj-rome-fetcher "0.1.0"]

Usage

You can use the ROME fetcher to retrieve a feed from the web with caching and conditional GET handled for you:

    ;; creating a caching fetcher
    ;; type can be any of :hash-map, :linked-hash-map, :disk
    (use 'clj-rome.fetcher)
    (def fetcher (build-url-fetcher :disk "/tmp/cache"))

    ;; you can attach a listener to your fetcher
    (add-listener fetcher (fn [event] (println event)))

    ;; using the fetcher with a cache to fetch a feed
    (def feed
      (with-fetcher fetcher
        (retrieve-feed "http://www.atomenabled.org/atom.xml")))

For more documentation on ROME, see the ROME Fetcher javadocs.

License

Copyright (C) 2012, 2013 Nils Grunwald

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.