in your project.clj
(ns your.app (:use socrates.api.direct-answer)) ;; get your api account id and password from somewhere (def my-account-id "api_you") (def my-account-password "eqwjdhq989282") (with-credentials my-account-id my-account-password (let [answer (direct-answer "What color is a banana?")] (if (:answered answer) (println (:result answer))))) ;; prints "yellow, (the colour)"
Copyright (C) 2011 Josh Rotenberg
Distributed under the Eclipse Public License, the same as Clojure.