markpercival-rturk 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.markdown +44 -0
  2. metadata +72 -0
data/README.markdown ADDED
@@ -0,0 +1,44 @@
1
+ # RTurk - A ridiculously simple Mechanical Turk library in Ruby
2
+
3
+ ## What's it do?!?
4
+
5
+ RTurk is designed to fire off Mechanical Turk tasks for pages that reside on a external site.
6
+
7
+ The pages could be a part of a rails app, or just a simple javascript enabled form.
8
+
9
+ If you want to build forms that are hosted on Mechanical Turk, this is not the library you need.
10
+ You'd be better off with amazon's official library, in all its XML cruftiness.
11
+
12
+ ## Installation
13
+
14
+ sudo gem install markpercival-rturk --sources http://gems.github.com
15
+
16
+ ## Use
17
+
18
+ Let's say you have a form at "http://myapp.com/turkers/add_tags" where Turkers can add some tags to items in your catalogue.
19
+
20
+ require 'rturk'
21
+
22
+ props = {:Title=>"Add tags to an item",
23
+ :MaxAssignments=>1, :LifetimeInSeconds=>3600,
24
+ :Reward=>{:Amount=>0.05, :CurrencyCode=>"USD"},
25
+ :Keywords=>"twitter, blogging, writing, english",
26
+ :Description=>"Simply add some tags for me",
27
+ :RequesterAnnotation=>"Example1",
28
+ :AssignmentDurationInSeconds=>3600, :AutoApprovalDelayInSeconds=>3600,
29
+ :QualificationRequirement=>[{
30
+ # Approval rate of greater than 90%
31
+ :QualificationTypeId=>"000000000000000000L0",
32
+ :IntegerValue=>90,
33
+ :Comparator=>"GreaterThan",
34
+ :RequiredToPreview=>"false"
35
+ }]
36
+ }
37
+
38
+ @turk = RTurk::Requester.new(AWSAccessKeyId, AWSAccessKey, :sandbox => true)
39
+ page = RTurk::ExternalQuestionBuilder.build(
40
+ "http://myapp.com/turkers/add_tags", :item_id => '1234')
41
+
42
+ # Turkers will be directed to http://myapp.com/turkers/add_tags?item_id=1234
43
+
44
+ p @turk.create_hit(props, page)
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: markpercival-rturk
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mark Percival
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-20 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rest-client
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0.9"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: xml-simple
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.12
34
+ version:
35
+ description: Twitter API wrapper - super simple
36
+ email: mark@markpercival.us
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - README.markdown
45
+ has_rdoc: true
46
+ homepage: http://github.com/markpercival/rturk
47
+ post_install_message:
48
+ rdoc_options: []
49
+
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project:
67
+ rubygems_version: 1.2.0
68
+ signing_key:
69
+ specification_version: 2
70
+ summary: simple Twitter API wrapper
71
+ test_files: []
72
+