Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

ngrunwald/clj-rome-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Wrapper for the fetcher part of the ROME suite for feed parsing

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors