Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

smnirven/biomass

 
 

Repository files navigation

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.

About

Boss people around. No suit required.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 100.0%