oldtimeguitarguy / mechanical-turk
An easily-extensible php client for the Amazon Mechanical Turk API
v1.7.0
2017-02-23 21:31 UTC
Requires
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^5.4
README
An easily-extensible php client for the Amazon Mechanical Turk API
As you can probably tell, this is not a complete implementation. Feel free to contribute, but please reference the contribution guidelines below. Thank you!
Installation
Usage
Laravel
Contributing
Adding Operations
- Create a new class in
src/OldTimeGuitarGuy/MechanicalTurk/Operations
that extends fromBase\Operation
. The class name MUST be the exact name of the operation according to the documentation. - Add an entry to the operations array in
src/OldTimeGuitarGuy/MechanicalTurk/Requester.php
. The key must be the camelcase version of the operation name. - Add an entry to the documentation array in
src/OldTimeGuitarGuy/MechanicalTurk/Exceptions/MechanicalTurkOperationException.php
. The key must be the exact name of the operation according to the documentation. - Create a new (passing) test class in
tests/
that extends fromOperationTestCase
. The name of the class MUST be the exact name of the operation according to the documentation, followed by Test. (ex.tests/CreateHITTest.php
) Reference the other tests for formatting examples.
When defining
satisfiesRequirements
, you can use the instance methodisSetOn
to easily determine the requirements.
NOTE: You should NOT include Operation as a requirement, as this will be set automatically during the request.