Boss people around. No suit required.
Clojure
Switch branches/tags
Pull request Compare This branch is 44 commits ahead, 2 commits behind rboyd:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src/biomass
test-resources
test/biomass/unit/response
.gitignore
.nrepl-port
.travis.yml
README.md
project.clj

README.md

biomass

Det. Thorn: "Who bought you?"

Hatcher: "You're bought as soon as they pay you a salary."

-- Soylent Green

Drive Amazon Mechanical Turk from your Clojure apps.

biomass is an implementation of the Amazon Web Services Mechanical Turk REST API in clojure.

#Build Status Build Status Dependency Status

Kudos

Kudos to [Robert Boyd] (https://github.com/rboyd) for the original implementation and inspiration

Installation

biomass is available as a Maven artifact from Clojars

Clojars Project

Configuration

Before making any requests, be sure to set your AWS credentials

(biomass.request/setup {:AWSAccessKey    "deadbeef"
                        :AWSSecretAccessKey "cafebabe"})

Whilst testing, you may find it useful to route all your requests to the AWS Mechanical Turk Sandbox environment.

(biomass.request/setup {:AWSAccessKey    "deadbeef"
                        :AWSSecretAccessKey "cafebabe"
                        :sandbox true})

Usage

Amazon Mechanical Turk allocates jobs to humans in the form of "Human Intelligence Tasks" or "HITs".

First create a HIT type and Layout using the Requester UI.

Example of creating a HIT:

(let [hit-type-id     "VCZVWLDJOTFFJXXQLGXZ"
      hit-layout-id   "WMYUHDBKJKNGOAMNCNMT"
      10-minutes      (* 10 60)
      1-day           (* 24 60 60)]
  (biomass.hits/create-hit {:hit-type-id hit-type-id
                            :hit-layout-id hit-layout-id 
                            :assignment-duration 10-minutes
                            :lifetime 1-day
                            :layout-params {:layout-parameter1 "This is a variable defined in the layout"
                                            :layout-parameter2 "This is another"}})

Check out the wiki for more usage examples

License

Copyright © 2014 Thomas Steffes

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