Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

True Knowledge API in Clojure

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 resources
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 project.clj
README.md

socrates

socrates is a simple Clojure client for the True Knowledge API.

Usage

in your project.clj

[socrates "0.0.1"]
(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)"

License

Copyright (C) 2011 Josh Rotenberg

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

Something went wrong with that request. Please try again.