Node API for Amazon Mechanical Turk
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.jshintrc
README.md
package.json

README.md

Amazon Mechanical Turk (AMT)

Node API for Amazon Mechanical Turk, heavily inspired by mturk by jefftimesten.

Getting Started

Install the module with: npm install amt

var AMT = require('amt');
amt = new AMT( {
  key: 'API_KEY',
  secret: 'SECRET_KEY',
} );

var hit = new amt.HIT( {
  title: 'Test',
  description: 'Test description',
  reward: new amt.Reward( 0.01 ),
  question: 'Some super complex xml here',
  duration: 60*1, // 1 minute,
  life: 60*5 // 5 minutes
} );

hit.create( function( err, hit ) {
  // hit created! wow
} );

Documentation

Simple objects

  • Reward
  • Notification

HITType

Class description.

hitType.create( callback )

TODO

hitType.setNotification( notification, callback )

TODO

HIT

Class description.

Static methods:

  • HIT.get( id, callback )
  • HIT.search( params, callback )

hit.create( callback )

TODO

hit.disable( callback )

TODO

hit.dispose( callback )

TODO

hit.expire( callback )

TODO

hit.getAssignments( params, callback )

TODO

Assignment

Class description.

Static methods:

  • Assignment.get( id, callback )

assignment.approve( message, callback );

TODO

assignment.reject( message, callback );

TODO

assignment.approveRejected( message, callback );

TODO

Examples

See test.js

License

Copyright (c) 2013 Riccardo Volonterio. Licensed under the MIT license.