Gdata-books-clojure is a project mainly written in Clojure, it's free.
A clojure friendly wrapper for Google's GData Books API
Clojure friendly wrapper for Google's GData Books API. (javadocs)
If you are using [leiningen][leiningen], add gdata-books-clojure to your dependencies:
[gdata-books-clojure "1.0.0-SNAPSHOT"]
First, tell the library your name, your application's name, and version number, in "yourname-appname-1.0" format:
(set-application-name "joeking-kewlapp-1.0")
Google uses this information to identify applications that are abusing the API.
Then you can search for books by title, or title and author:
user> (search "Stranger in a Strange Land")
#<VolumeFeed {VolumeFeed com.google.gdata.data.books.VolumeFeed@1d95643}>
user> (search {:title "Stranger in a Strange Land", :author "Robert Heinlein"})
#<VolumeFeed {VolumeFeed com.google.gdata.data.books.VolumeFeed@578b06}>
user> (search {:title "Stranger in a Strange Land", :author "Heather L. Katz"})
#<VolumeFeed {VolumeFeed com.google.gdata.data.books.VolumeFeed@13f54ae}>
search returns a VolumeFeed which represents an Atom feed for search results for the book. You can use the helper functions in gdata-books-clojure to tease out the pieces of information you want, without having to know the structure of the atom feed or the the java API:
user> (map creators (entries (search "Stranger in a Strange Land")))
(("Robert A. Heinlein") ("Gary Younge") ("Robert Anson Heinlein") ("Heather L. Katz") ...)
user> (map titles (entries (search {:title "Stranger in a Strange Land", :author "Heather L. Katz"})))
(("Stranger in a strange land" "Muslim political identity in the context of liberal democracy"))
user> (map titles (entries (search {:author "H Beam Piper"})))
(("Little Fuzzy") ("Space Viking") ("Uller Uprising") ("Time Crime") ("The Cosmic Computer") ...)
Using these building blocks, you could build really complicated queries:
;; Search for books with "Monkeys" then search for all books by the
;; authors of the monkey books
(->> (search "Monkeys")
entries
(map creators)
flatten
distinct
(map #(search {:author %})))
Copyright (C) 2010 Chris Bilson
Distributed under the Eclipse Public License, the same as Clojure.