rturk 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. data/README.markdown +3 -2
  2. data/Rakefile +10 -4
  3. data/VERSION +1 -1
  4. data/aws_docs/ApiReference_AnswerKeyDataStructureArticle.html +98 -0
  5. data/aws_docs/ApiReference_ApproveAssignmentOperation.html +75 -0
  6. data/aws_docs/ApiReference_AssignQualificationOperation.html +107 -0
  7. data/aws_docs/ApiReference_AssignmentDataStructureArticle.html +171 -0
  8. data/aws_docs/ApiReference_BlockWorkerOperation.html +70 -0
  9. data/aws_docs/ApiReference_ChangeHITTypeOfHITOperation.html +68 -0
  10. data/aws_docs/ApiReference_CommonParametersArticle.html +119 -0
  11. data/aws_docs/ApiReference_CreateHITOperation.html +330 -0
  12. data/aws_docs/ApiReference_CreateQualificationTypeOperation.html +190 -0
  13. data/aws_docs/ApiReference_DataStructuresArticle.html +7 -0
  14. data/aws_docs/ApiReference_DisableHITOperation.html +63 -0
  15. data/aws_docs/ApiReference_DisposeHITOperation.html +56 -0
  16. data/aws_docs/ApiReference_DisposeQualificationTypeOperation.html +52 -0
  17. data/aws_docs/ApiReference_ExtendHITOperation.html +86 -0
  18. data/aws_docs/ApiReference_ExternalQuestionArticle.html +125 -0
  19. data/aws_docs/ApiReference_ForceExpireHITOperation.html +61 -0
  20. data/aws_docs/ApiReference_FormattedContentXHTMLArticle.html +289 -0
  21. data/aws_docs/ApiReference_GetAccountBalanceOperation.html +51 -0
  22. data/aws_docs/ApiReference_GetAssignmentsForHITOperation.html +166 -0
  23. data/aws_docs/ApiReference_GetBonusPaymentsOperation.html +160 -0
  24. data/aws_docs/ApiReference_GetFileUploadURLOperation.html +75 -0
  25. data/aws_docs/ApiReference_GetHITOperation.html +89 -0
  26. data/aws_docs/ApiReference_GetHITsForQualificationTypeOperation.html +137 -0
  27. data/aws_docs/ApiReference_GetQualificationRequestsOperation.html +155 -0
  28. data/aws_docs/ApiReference_GetQualificationScoreOperation.html +68 -0
  29. data/aws_docs/ApiReference_GetQualificationTypeOperation.html +57 -0
  30. data/aws_docs/ApiReference_GetQualificationsForQualificationTypeOperation.html +134 -0
  31. data/aws_docs/ApiReference_GetRequesterStatisticOperation.html +315 -0
  32. data/aws_docs/ApiReference_GetReviewableHITsOperation.html +155 -0
  33. data/aws_docs/ApiReference_GrantBonusOperation.html +95 -0
  34. data/aws_docs/ApiReference_GrantQualificationOperation.html +69 -0
  35. data/aws_docs/ApiReference_HITDataStructureArticle.html +302 -0
  36. data/aws_docs/ApiReference_HelpOperation.html +125 -0
  37. data/aws_docs/ApiReference_LocaleDataStructureArticle.html +29 -0
  38. data/aws_docs/ApiReference_NotificationAPI_BuildingANotificationReceptor.html +36 -0
  39. data/aws_docs/ApiReference_NotificationAPI_ElementsOfANotification.html +40 -0
  40. data/aws_docs/ApiReference_NotificationDataStructureArticle.html +73 -0
  41. data/aws_docs/ApiReference_NotificationReceptorAPIArticle.html +9 -0
  42. data/aws_docs/ApiReference_NotificationReceptorAPI_RESTTransportArticle.html +39 -0
  43. data/aws_docs/ApiReference_NotificationReceptorAPI_SOAPTransportArticle.html +45 -0
  44. data/aws_docs/ApiReference_NotifyWorkersOperation.html +82 -0
  45. data/aws_docs/ApiReference_OperationsArticle.html +8 -0
  46. data/aws_docs/ApiReference_PriceDataStructureArticle.html +65 -0
  47. data/aws_docs/ApiReference_QualificationDataStructureArticle.html +89 -0
  48. data/aws_docs/ApiReference_QualificationRequestDataStructureArticle.html +102 -0
  49. data/aws_docs/ApiReference_QualificationRequirementDataStructureArticle.html +176 -0
  50. data/aws_docs/ApiReference_QualificationTypeDataStructureArticle.html +198 -0
  51. data/aws_docs/ApiReference_QuestionAnswerDataArticle.html +8 -0
  52. data/aws_docs/ApiReference_QuestionFormAnswersDataStructureArticle.html +54 -0
  53. data/aws_docs/ApiReference_QuestionFormDataStructureArticle.html +796 -0
  54. data/aws_docs/ApiReference_RegisterHITTypeOperation.html +149 -0
  55. data/aws_docs/ApiReference_RejectAssignmentOperation.html +66 -0
  56. data/aws_docs/ApiReference_RejectQualificationRequestOperation.html +61 -0
  57. data/aws_docs/ApiReference_RevokeQualificationOperation.html +78 -0
  58. data/aws_docs/ApiReference_SearchHITsOperation.html +164 -0
  59. data/aws_docs/ApiReference_SearchQualificationTypesOperation.html +211 -0
  60. data/aws_docs/ApiReference_SendTestEventNotificationOperation.html +78 -0
  61. data/aws_docs/ApiReference_SetHITAsReviewingOperation.html +73 -0
  62. data/aws_docs/ApiReference_SetHITTypeNotificationOperation.html +99 -0
  63. data/aws_docs/ApiReference_UnblockWorkerOperation.html +67 -0
  64. data/aws_docs/ApiReference_UpdateQualificationScoreOperation.html +77 -0
  65. data/aws_docs/ApiReference_UpdateQualificationTypeOperation.html +180 -0
  66. data/aws_docs/ApiReference_WsdlLocationArticle.html +95 -0
  67. data/aws_docs/ApiReference_XMLParameterValuesArticle.html +37 -0
  68. data/aws_docs/Welcome.html +125 -0
  69. data/aws_docs/WhatsNew.html +16 -0
  70. data/aws_docs/_title.html +28 -0
  71. data/aws_docs/_toc.html +749 -0
  72. data/aws_docs/aws-docs-IE.css +419 -0
  73. data/aws_docs/aws-docs.css +455 -0
  74. data/aws_docs/copyrightinfo.html +14 -0
  75. data/aws_docs/frameset.js +12 -0
  76. data/aws_docs/images/Feedback_link.gif +0 -0
  77. data/aws_docs/images/caution.png +0 -0
  78. data/aws_docs/images/home.gif +0 -0
  79. data/aws_docs/images/important.png +0 -0
  80. data/aws_docs/images/next.gif +0 -0
  81. data/aws_docs/images/note.png +0 -0
  82. data/aws_docs/images/prev.gif +0 -0
  83. data/aws_docs/images/tip.png +0 -0
  84. data/aws_docs/images/title-swoosh-logo.gif +0 -0
  85. data/aws_docs/images/toc_bullet.gif +0 -0
  86. data/aws_docs/images/toc_plus.gif +0 -0
  87. data/aws_docs/index.html +18 -0
  88. data/aws_docs/toc.js +84 -0
  89. data/lib/rturk.rb +2 -2
  90. data/lib/rturk/adapter.rb +11 -0
  91. data/lib/rturk/adapters/assignment.rb +13 -50
  92. data/lib/rturk/adapters/hit.rb +21 -9
  93. data/lib/rturk/adapters/worker.rb +23 -0
  94. data/lib/rturk/operation.rb +1 -1
  95. data/lib/rturk/operations/create_hit.rb +10 -54
  96. data/lib/rturk/operations/register_hit_type.rb +68 -0
  97. data/lib/rturk/operations/search_hits.rb +44 -0
  98. data/lib/rturk/parser.rb +8 -0
  99. data/lib/rturk/parsers/answer_parser.rb +29 -0
  100. data/lib/rturk/parsers/assignment_parser.rb +49 -0
  101. data/lib/rturk/parsers/hit_parser.rb +50 -0
  102. data/lib/rturk/{response.rb → parsers/response.rb} +7 -2
  103. data/lib/rturk/{responses → parsers/responses}/create_hit_response.rb +2 -2
  104. data/lib/rturk/{responses → parsers/responses}/get_account_balance_response.rb +0 -0
  105. data/lib/rturk/{responses → parsers/responses}/get_assignments_for_hit_response.rb +3 -3
  106. data/lib/rturk/{responses → parsers/responses}/get_hit_response.rb +9 -16
  107. data/lib/rturk/{responses → parsers/responses}/get_reviewable_hits_response.rb +3 -5
  108. data/lib/rturk/parsers/responses/register_hit_type_response.rb +17 -0
  109. data/lib/rturk/parsers/responses/search_hits_response.rb +65 -0
  110. data/lib/rturk/xml_utilities.rb +14 -3
  111. data/rturk.gemspec +112 -12
  112. data/spec/adapters/hit_spec.rb +10 -0
  113. data/spec/fake_responses/register_hit_type.xml +6 -0
  114. data/spec/fake_responses/search_hits.xml +50 -0
  115. data/spec/operations/create_hit_spec.rb +2 -2
  116. data/spec/operations/get_hit_spec.rb +1 -1
  117. data/spec/operations/register_hit_type_spec.rb +24 -0
  118. data/spec/{adapters/answers_spec.rb → parsers/answer_parser_spec.rb} +2 -2
  119. data/spec/parsers/hit_parser_spec.rb +41 -0
  120. data/spec/xml_parse_spec.rb +2 -2
  121. metadata +111 -11
  122. data/lib/rturk/adapters/answers.rb +0 -38
data/README.markdown CHANGED
@@ -24,9 +24,10 @@ Let's say you have a form at "http://myapp.com/turkers/add_tags" where Turkers c
24
24
  RTurk.setup(YourAWSAccessKeyId, YourAWSAccessKey, :sandbox => true)
25
25
  hit = RTurk::Hit.create(:title => "Add some tags to a photo") do |hit|
26
26
  hit.assignments = 2
27
+ hit.description = 'blah'
27
28
  hit.question("http://myapp.com/turkers/add_tags")
28
29
  hit.reward = 0.05
29
- hit.qualifications.approval_rate, {:gt => 80}
30
+ hit.qualifications.add :approval_rate, { :gt => 80 }
30
31
  end
31
32
 
32
33
  p hit.url #=> 'https://workersandbox.mturk.com:443/mturk/preview?groupId=Q29J3XZQ1ASZH5YNKZDZ'
@@ -95,4 +96,4 @@ Anything submitted in this form will be sent to Amazon and saved for your review
95
96
  Take a look at the [Amazon MTurk developer docs](http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMechanicalTurkRequester/) for more information. They have a complete list of API operations, all of which can be called with this library.
96
97
 
97
98
 
98
-
99
+
data/Rakefile CHANGED
@@ -1,6 +1,14 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
- require 'yard'
3
+
4
+ begin
5
+ require 'yard'
6
+ YARD::Rake::YardocTask.new do |t|
7
+ t.files = ['lib/**/*.rb', 'lib/**/*.rb']
8
+ end
9
+ rescue LoadError
10
+ puts "YARD is not available. For generating docs, you'll need to sudo gem install yard"
11
+ end
4
12
 
5
13
  begin
6
14
  require 'jeweler'
@@ -48,6 +56,4 @@ Rake::RDocTask.new do |rdoc|
48
56
  end
49
57
 
50
58
 
51
- YARD::Rake::YardocTask.new do |t|
52
- t.files = ['lib/**/*.rb', 'lib/**/*.rb']
53
- end
59
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.2
1
+ 2.0.3
@@ -0,0 +1,98 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>AnswerKey</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_QuestionAnswerDataArticle.html" title="Chapter&nbsp;7.&nbsp;Question and Answer Data"><link rel="prev" href="ApiReference_QuestionFormAnswersDataStructureArticle.html" title="QuestionFormAnswers"><link rel="next" href="ApiReference_ExternalQuestionArticle.html" title="ExternalQuestion"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_QuestionFormAnswersDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AnswerKeyDataStructureArticle">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_ExternalQuestionArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_QuestionAnswerDataArticle.html">Question and Answer Data</a> &raquo; <strong>AnswerKey</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">AnswerKey</h1></div></div></div><a class="indexterm" name="d0e19956"></a><a class="indexterm" name="d0e19959"></a><a class="indexterm" name="d0e19964"></a><a class="indexterm" name="d0e19969"></a><div class="highlights"><p><strong>Topics</strong></p><ul><li><a href="ApiReference_AnswerKeyDataStructureArticle.html#d0e19975">Description</a></li><li><a href="ApiReference_AnswerKeyDataStructureArticle.html#d0e20019">The Structure of an Answer Key</a></li><li><a href="ApiReference_AnswerKeyDataStructureArticle.html#d0e20166">Example</a></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e19975">Description</h2></div></div></div><p> The AnswerKey data structure specifies answers for a Qualification test, and a mechanism to use
7
+ to calculate a score from the key and a Worker's answers. </p><p> An AnswerKey data structure is a string value that consists of XML data. The XML data must
8
+ conform to the AnswerKey schema. See <a class="link" href="ApiReference_WsdlLocationArticle.html" title="Chapter&nbsp;3.&nbsp;WSDL and Schema Locations">WSDL and
9
+ Schema Locations</a> for the location of this schema. For more information about using XML
10
+ data as parameter or return value, see <a class="link" href="ApiReference_XMLParameterValuesArticle.html" title="Using XML Parameter Values">Using XML Parameter Values</a>. </p><p> The AnswerKey data structure is used as a parameter for the following operations: </p><div class="itemizedlist"><ul type="disc"><li><p>
11
+ <code class="function">CreateQualificationType</code>
12
+ </p></li></ul></div><p> The AnswerKey data structure is used as a return value for the following operations: </p><div class="itemizedlist"><ul type="disc"><li><p>
13
+ <code class="function">GetQualificationType</code>
14
+ </p></li></ul></div><p> The AnswerKey data structure is a value in a <a class="link" href="ApiReference_QualificationTypeDataStructureArticle.html" title="QualificationType">Qualification type data
15
+ structure</a>. </p><p> All elements in a <em class="parameter"><code>AnswerKey</code></em> belong to a namespace whose name is
16
+ identical to the URL of the <em class="parameter"><code>AnswerKey</code></em> schema document for the version of
17
+ the API you are using. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20019">The Structure of an Answer Key</h2></div></div></div><p> An answer key is contained in a <em class="parameter"><code>AnswerKey</code></em> element. This element contains
18
+ a <em class="parameter"><code>Question</code></em> element for each question in the Qualification test, and an
19
+ optional <em class="parameter"><code>QualificationValueMapping</code></em> element that describes how to calculate
20
+ the Qualification value from the answer key and the Worker's answers. </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e20033">Question</h3></div></div></div><p> A <em class="parameter"><code>Question</code></em> element contains a
21
+ <em class="parameter"><code>QuestionIdentifier</code></em> element, which identifies the question for this
22
+ answer. This value corresponds to a <em class="parameter"><code>QuestionIdentifier</code></em> in the
23
+ QuestionForm. </p><p> A <em class="parameter"><code>Question</code></em> element has one or more
24
+ <em class="parameter"><code>AnswerOption</code></em> elements, one for each combination of selections in the
25
+ multiple-choice question that affects the Worker's test score. </p><p> Each <em class="parameter"><code>AnswerOption</code></em> contains one or more
26
+ <em class="parameter"><code>SelectionIdentifier</code></em> elements that correspond to identifiers for the
27
+ selections in the QuestionForm. It also contains an <em class="parameter"><code>AnswerScore</code></em>
28
+ element, a number that is added to the Worker's test score if the Worker's answer matches this
29
+ option. The Worker must select all of the selections specified by the
30
+ <em class="parameter"><code>SelectionIdentifier</code></em> elements, and no others, to earn the score. </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p> An <em class="parameter"><code>AnswerScore</code></em> for an <em class="parameter"><code>AnswerOption</code></em> may be
31
+ negative. </p></td></tr></table></div><p> The <em class="parameter"><code>Question</code></em> may have an optional
32
+ <em class="parameter"><code>DefaultScore</code></em>, a number that is added to the Worker's test score if none
33
+ of the answer options exactly match the Worker's answer for the question.
34
+ <em class="parameter"><code>DefaultScore</code></em> is optional, and defaults to 0. </p><pre class="programlisting">&lt;AnswerOption&gt;
35
+ &lt;SelectionIdentifier&gt;apples&lt;/SelectionIdentifier&gt;
36
+ &lt;AnswerScore&gt;10&lt;/AnswerScore&gt;
37
+ &lt;/AnswerOption&gt;</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e20091">QualificationValueMapping</h3></div></div></div><p> The <em class="parameter"><code>Question</code></em> may have an optional
38
+ <em class="parameter"><code>QualificationValueMapping</code></em> element that describes how to calculate
39
+ the Worker's overall score from the scores of the Worker's answers. It contains either a
40
+ <em class="parameter"><code>PercentageMapping</code></em> element, a <em class="parameter"><code>ScaleMapping</code></em>
41
+ element, or a <em class="parameter"><code>RangeMapping</code></em> element. </p><p> If no <em class="parameter"><code>QualificationValueMapping</code></em> is specified, the sum of the scores
42
+ of the answers is used as the Qualification value. </p><pre class="programlisting">&lt;QualificationValueMapping&gt;
43
+ ...
44
+ &lt;/QualificationValueMapping&gt;</pre><p> A <em class="parameter"><code>PercentageMapping</code></em> specifies a maximum score for the test, as a
45
+ <em class="parameter"><code>MaximumSummedScore</code></em> element. The Qualification value is calculated
46
+ as the sum of the scores of the selected answers, divided by the maximum, multiplied by 100
47
+ and rounded to the nearest integer to produce a percentage. </p><pre class="programlisting"> ...
48
+ &lt;PercentageMapping&gt;
49
+ &lt;MaximumSummedScore&gt;15&lt;/MaximumSummedScore&gt;
50
+ &lt;/PercentageMapping&gt;</pre><p> A <em class="parameter"><code>ScaleMapping</code></em> specifies a multiplier, as a decimal value in a
51
+ <em class="parameter"><code>SummedScoreMultiplier</code></em> element. The Qualification value is
52
+ calculated as the sum of the scores of the selected answers, multiplied by the multiplier. </p><pre class="programlisting"> ...
53
+ &lt;ScaleMapping&gt;
54
+ &lt;SummedScoreMultiplier&gt;3&lt;/SummedScoreMultiplier&gt;
55
+ &lt;/ScaleMapping&gt;</pre><p> A <em class="parameter"><code>RangeMapping</code></em> assigns specific Qualification values to ranges of
56
+ total test scores. It contains one or more <em class="parameter"><code>SummedScoreRange</code></em> elements,
57
+ each of which specify an <em class="parameter"><code>InclusiveLowerBound</code></em> element, an
58
+ <em class="parameter"><code>InclusiveUpperBound</code></em> element, and a
59
+ <em class="parameter"><code>QualificationValue</code></em> that becomes the Qualification value if the sum of
60
+ the scores of the selected answers falls within the specified range. Finally, the
61
+ <em class="parameter"><code>RangeMapping</code></em> includes a single
62
+ <em class="parameter"><code>OutOfRangeQualificationValue</code></em>, which specifies the Qualification
63
+ value if the sum of the scores of the selected answers do not fall within a specified range. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> Ranges cannot overlap. If ranges overlap, the behavior is undefined. </p></td></tr></table></div><pre class="programlisting"> ...
64
+ &lt;RangeMapping&gt;
65
+ &lt;SummedScoreRange&gt;
66
+ &lt;InclusiveLowerBound&gt;5&lt;/InclusiveLowerBound&gt;
67
+ &lt;InclusiveUpperBound&gt;7&lt;/InclusiveUpperBound&gt;
68
+ &lt;QualificationValue&gt;5&lt;/QualificationValue&gt;
69
+ &lt;/SummedScoreRange&gt;
70
+ &lt;SummedScoreRange&gt;
71
+ &lt;InclusiveLowerBound&gt;8&lt;/InclusiveLowerBound&gt;
72
+ &lt;InclusiveUpperBound&gt;10&lt;/InclusiveUpperBound&gt;
73
+ &lt;QualificationValue&gt;10&lt;/QualificationValue&gt;
74
+ &lt;/SummedScoreRange&gt;
75
+ &lt;OutOfRangeQualificationValue&gt;0&lt;/OutOfRangeQualificationValue&gt;
76
+ &lt;/RangeMapping&gt;</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20166">Example</h2></div></div></div><p> The following is an example of a complete <em class="parameter"><code>QuestionForm</code></em> data structure.
77
+ Remember that to pass this structure in as a parameter to an operation, XML characters must be
78
+ escaped as character entities. </p><pre class="programlisting">&lt;AnswerKey xmlns="<em class="replaceable"><code>[the AnswerKey schema URL]</code></em>"&gt;
79
+ &lt;Question&gt;
80
+ &lt;QuestionIdentifier&gt;nextmove&lt;/QuestionIdentifier&gt;
81
+ &lt;AnswerOption&gt;
82
+ &lt;SelectionIdentifier&gt;D&lt;/SelectionIdentifier&gt;
83
+ &lt;AnswerScore&gt;5&lt;/AnswerScore&gt;
84
+ &lt;/AnswerOption&gt;
85
+ &lt;/Question&gt;
86
+ &lt;Question&gt;
87
+ &lt;QuestionIdentifier&gt;favoritefruit&lt;/QuestionIdentifier&gt;
88
+ &lt;AnswerOption&gt;
89
+ &lt;SelectionIdentifier&gt;apples&lt;/SelectionIdentifier&gt;
90
+ &lt;AnswerScore&gt;10&lt;/AnswerScore&gt;
91
+ &lt;/AnswerOption&gt;
92
+ &lt;/Question&gt;
93
+ &lt;QualificationValueMapping&gt;
94
+ &lt;PercentageMapping&gt;
95
+ &lt;MaximumSummedScore&gt;15&lt;/MaximumSummedScore&gt;
96
+ &lt;/PercentageMapping&gt;
97
+ &lt;/QualificationValueMapping&gt;
98
+ &lt;/AnswerKey&gt;</pre></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_QuestionFormAnswersDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AnswerKeyDataStructureArticle">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_ExternalQuestionArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,75 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>ApproveAssignment</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="next" href="ApiReference_AssignQualificationOperation.html" title="AssignQualification"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_OperationsArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_ApproveAssignmentOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_AssignQualificationOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>ApproveAssignment</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">ApproveAssignment</h1></div></div></div><a class="indexterm" name="d0e1122"></a><a class="indexterm" name="d0e1125"></a><a class="indexterm" name="d0e1130"></a><a class="indexterm" name="d0e1135"></a><a class="indexterm" name="d0e1140"></a><a class="indexterm" name="d0e1145"></a><a class="indexterm" name="d0e1148"></a><a class="indexterm" name="d0e1153"></a><a class="indexterm" name="d0e1158"></a><a class="indexterm" name="d0e1163"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1168">Description</h2></div></div></div><p> The <code class="function">ApproveAssignment</code> operation approves the results of a
7
+ completed assignment. </p><p> Approving an assignment initiates two payments from the Requester's Amazon.com
8
+ account: the Worker who submitted the results is paid the reward specified in the HIT,
9
+ and Amazon Mechanical Turk fees are debited. If the Requester's account does not have
10
+ adequate funds for these payments, the call to <code class="function">ApproveAssignment</code>
11
+ returns an exception, and the approval is not processed. </p><p> You can include an optional feedback message with the approval, which the Worker can
12
+ see in the <span class="guilabel">Status</span> section of the web site. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1186">Request Parameters</h2></div></div></div><p> The <code class="function">ApproveAssignment</code> operation accepts parameters common to all
13
+ operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">Common Parameters</a> for more information. </p><p> The following parameters are specific to the <code class="function">ApproveAssignment</code>
14
+ operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
15
+ <p class="simpara">
16
+ <em class="parameter"><code>Operation</code></em>
17
+ </p>
18
+ </td><td>
19
+ <p class="simpara">The name of the operation</p>
20
+ <p class="simpara">Type: String</p>
21
+ <p class="simpara">Valid Values: ApproveAssignment</p>
22
+ <p class="simpara">Default: None</p>
23
+ </td><td>
24
+ <p class="simpara">Yes</p>
25
+ </td></tr><tr><td>
26
+ <p class="simpara">
27
+ <em class="parameter"><code>AssignmentId</code></em>
28
+ </p>
29
+ </td><td>
30
+ <p class="simpara"> The ID of the assignment. This parameter must correspond to a
31
+ HIT created by the Requester. </p>
32
+ <p class="simpara">Type: String</p>
33
+ <p class="simpara">Default: None</p>
34
+ </td><td>
35
+ <p class="simpara">Yes</p>
36
+ </td></tr><tr><td>
37
+ <p class="simpara">
38
+ <em class="parameter"><code>RequesterFeedback</code></em>
39
+ </p>
40
+ </td><td>
41
+ <p class="simpara"> A message for the Worker, which the Worker can see in the
42
+ <span class="guilabel">Status</span> section of the web site. </p>
43
+ <p class="simpara">Type: String</p>
44
+ <p class="simpara">Default: None</p>
45
+ <p class="simpara"> Constraints: Can be up to 1024 characters (including
46
+ multi-byte characters). </p>
47
+ <p class="simpara"> The <em class="parameter"><code>RequesterFeedback</code></em> parameter cannot
48
+ contain ASCII characters 0-8, 11,12, or 14-31. If these characters
49
+ are present, the operation throws an InvalidParameterValue error.
50
+ </p>
51
+ </td><td>
52
+ <p class="simpara">No</p>
53
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1305">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">ApproveAssignment</code> operation returns
54
+ with no errors. The response includes the elements described in the following table. The
55
+ operation returns no other data. </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
56
+ <p class="simpara">
57
+ <em class="parameter"><code>ApproveAssignmentResult</code></em>
58
+ </p>
59
+ </td><td>
60
+ <p class="simpara">Contains a <em class="parameter"><code>Request</code></em> element if the
61
+ <strong class="userinput"><code>Request</code></strong>
62
+ <em class="parameter"><code>ResposeGroup</code></em> is specified. </p>
63
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1347">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">ApproveAssignment</code>
64
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e1355">Sample Request</h3></div></div></div><p> The following example approves an assignment identified by its assignment ID. </p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
65
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
66
+ &amp;Version=2008-08-02
67
+ &amp;Operation=ApproveAssignment
68
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
69
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
70
+ &amp;AssignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE
71
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e1371">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;ApproveAssignmentResult&gt;
72
+ &lt;Request&gt;
73
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
74
+ &lt;/Request&gt;
75
+ &lt;/ApproveAssignmentResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_OperationsArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_ApproveAssignmentOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_AssignQualificationOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,107 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>AssignQualification</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_ApproveAssignmentOperation.html" title="ApproveAssignment"><link rel="next" href="ApiReference_BlockWorkerOperation.html" title="BlockWorker"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ApproveAssignmentOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AssignQualificationOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_BlockWorkerOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>AssignQualification</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">AssignQualification</h1></div></div></div><a class="indexterm" name="d0e1381"></a><a class="indexterm" name="d0e1384"></a><a class="indexterm" name="d0e1389"></a><a class="indexterm" name="d0e1392"></a><a class="indexterm" name="d0e1397"></a><a class="indexterm" name="d0e1402"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1407">Description</h2></div></div></div><p> The <code class="function">AssignQualification</code> operation gives a Worker a
7
+ Qualification. <code class="function">AssignQualification</code> does not require that the Worker
8
+ submit a Qualification request. It gives the Qualification directly to the Worker. </p><p> You can assign a Qualification to any Worker who has submitted one of your HITs in
9
+ the past. </p><p> You can only assign a Qualification of a Qualification type that you created (using
10
+ the <a class="link" href="ApiReference_CreateQualificationTypeOperation.html" title="CreateQualificationType">
11
+ CreateQualificationType</a> operation). </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>
12
+ <code class="function">AssignQualification</code> does not affect any pending Qualification
13
+ requests for the Qualification by the Worker. If you assign a Qualification to a
14
+ Worker, then later grant a Qualification request made by the Worker, the granting of
15
+ the request may modify the Qualification score. To resolve a pending Qualification
16
+ request without affecting the Qualification the Worker already has, reject the
17
+ request with the <a class="link" href="ApiReference_RejectQualificationRequestOperation.html" title="RejectQualificationRequest">
18
+ RejectQualificationRequest</a> operation. </p></td></tr></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1434">Request Parameters</h2></div></div></div><p> The <code class="function">AssignQualification</code> operation accepts parameters common to
19
+ all operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">CommonParameters</a> for more
20
+ information. </p><p> The following parameters are specific to the <code class="function">AssignQualification</code>
21
+ operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
22
+ <p class="simpara">
23
+ <em class="parameter"><code>Operation</code></em>
24
+ </p>
25
+ </td><td>
26
+ <p class="simpara">The name of the operation</p>
27
+ <p class="simpara">Type: String</p>
28
+ <p class="simpara">Valid Values: AssignQualifcation</p>
29
+ <p class="simpara">Default: None</p>
30
+ </td><td>
31
+ <p class="simpara">Yes</p>
32
+ </td></tr><tr><td>
33
+ <p class="simpara">
34
+ <em class="parameter"><code>QualificationTypeId</code></em>
35
+ </p>
36
+ </td><td>
37
+ <p class="simpara">The ID of the Qualification type to use for the assigned
38
+ Qualification.</p>
39
+ <p class="simpara">Type: String</p>
40
+ <p class="simpara">Default: None</p>
41
+ <p class="simpara"> Constraints: must be a valid Qualification type ID, as
42
+ returned by the <a class="link" href="ApiReference_CreateQualificationTypeOperation.html" title="CreateQualificationType">
43
+ CreateQualificationType</a> operation. </p>
44
+ </td><td>
45
+ <p class="simpara">Yes</p>
46
+ </td></tr><tr><td>
47
+ <p class="simpara">
48
+ <em class="parameter"><code>WorkerId</code></em>
49
+ </p>
50
+ </td><td>
51
+ <p class="simpara"> The ID of the Worker to whom the Qualification is being
52
+ assigned. Worker IDs are included with submitted HIT assignments and
53
+ Qualification requests. </p>
54
+ <p class="simpara">Type: String</p>
55
+ <p class="simpara">Default: None</p>
56
+ </td><td>
57
+ <p class="simpara">Yes</p>
58
+ </td></tr><tr><td>
59
+ <p class="simpara">
60
+ <em class="parameter"><code>IntegerValue</code></em>
61
+ </p>
62
+ </td><td>
63
+ <p class="simpara">The value of the Qualification to assign.</p>
64
+ <p class="simpara">Type: Integer</p>
65
+ <p class="simpara">Default: 1</p>
66
+ </td><td>
67
+ <p class="simpara">No</p>
68
+ </td></tr><tr><td>
69
+ <p class="simpara">
70
+ <em class="parameter"><code>SendNotification</code></em>
71
+ </p>
72
+ </td><td>
73
+ <p class="simpara"> Specifies whether to send a notification email message to the
74
+ Worker saying that the qualification was assigned to the Worker. </p>
75
+ <p class="simpara">Type: Boolean</p>
76
+ <p class="simpara"> Valid Values: <code class="code">true</code> | <code class="code">false</code>. </p>
77
+ <p class="simpara">Default: <code class="code">true</code></p>
78
+ </td><td>
79
+ <p class="simpara">No</p>
80
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1609">Response Elements</h2></div></div></div><p> A successful request for the AssignQualification operation returns with no errors.
81
+ The response includes the elements described in the following table. The operation
82
+ returns no other data. </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
83
+ <p class="simpara">
84
+ <em class="parameter"><code>AssignQualificationResult</code></em>
85
+ </p>
86
+ </td><td>
87
+ <p class="simpara"> Contains a <em class="parameter"><code>Request</code></em> element if the
88
+ <strong class="userinput"><code>Request</code></strong>
89
+ <em class="parameter"><code>ResposeGroup</code></em> is specified. </p>
90
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e1648">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">AssignQualification</code>
91
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e1656">Sample Request</h3></div></div></div><p> The following example assigns a Qualification of a specified type to a Worker
92
+ with the specified ID, using the specified Qualification value. By default,
93
+ Amazon Mechanical Turk sends the Worker an e-mail message saying that the Worker
94
+ has received the Qualification. </p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
95
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
96
+ &amp;Version=2008-08-02
97
+ &amp;Operation=AssignQualification
98
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
99
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
100
+ &amp;QualificationTypeId=789RVWYBAZW00EXAMPLE
101
+ &amp;WorkerId=AZ3456EXAMPLE
102
+ &amp;IntegerValue=800
103
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e1672">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;AssignQualificationResult&gt;
104
+ &lt;Request&gt;
105
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
106
+ &lt;/Request&gt;
107
+ &lt;/AssignQualificationResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ApproveAssignmentOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AssignQualificationOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_BlockWorkerOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,171 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>Assignment</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_DataStructuresArticle.html" title="Chapter&nbsp;6.&nbsp;Data Structures"><link rel="prev" href="ApiReference_DataStructuresArticle.html" title="Chapter&nbsp;6.&nbsp;Data Structures"><link rel="next" href="ApiReference_HITDataStructureArticle.html" title="HIT"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_DataStructuresArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AssignmentDataStructureArticle">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_HITDataStructureArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_DataStructuresArticle.html">Data Structures</a> &raquo; <strong>Assignment</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">Assignment</h1></div></div></div><a class="indexterm" name="d0e13741"></a><a class="indexterm" name="d0e13744"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e13749">Description</h2></div></div></div><p> The Assignment data structure represents a single assignment of a HIT to a Worker. The
7
+ assignment tracks the Worker's efforts to complete the HIT, and contains the results for later
8
+ retrieval. </p><p> The Assignment data structure is used as a response element for the following operation: </p><div class="itemizedlist"><ul type="disc"><li><p>
9
+ <a class="link" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT">GetAssignmentsForHIT</a>
10
+ </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e13763">Elements</h2></div></div></div><p> The Assignment structure can contain the following elements. </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
11
+ <p class="simpara">
12
+ <em class="parameter"><code>AssignmentId</code></em>
13
+ </p>
14
+ </td><td>
15
+ <p class="simpara">A unique identifier for the assignment</p>
16
+ <p class="simpara">Type: String</p>
17
+ <p class="simpara">Default: None</p>
18
+ </td><td>
19
+ <p class="simpara">No</p>
20
+ </td></tr><tr><td>
21
+ <p class="simpara">
22
+ <em class="parameter"><code>WorkerId</code></em>
23
+ </p>
24
+ </td><td>
25
+ <p class="simpara"> The ID of the Worker who accepted the HIT. </p>
26
+ <p class="simpara">Type: String</p>
27
+ <p class="simpara">Default: None</p>
28
+ </td><td>
29
+ <p class="simpara">No</p>
30
+ </td></tr><tr><td>
31
+ <p class="simpara">
32
+ <em class="parameter"><code>HITId</code></em>
33
+ </p>
34
+ </td><td>
35
+ <p class="simpara">The ID of the HIT</p>
36
+ <p class="simpara">Type: String</p>
37
+ <p class="simpara">Default: None</p>
38
+ </td><td>
39
+ <p class="simpara">No</p>
40
+ </td></tr><tr><td>
41
+ <p class="simpara">
42
+ <em class="parameter"><code>AssignmentStatus</code></em>
43
+ </p>
44
+ </td><td>
45
+ <p class="simpara">The status of the assignment</p>
46
+ <p class="simpara">Type: String</p>
47
+ <p class="simpara">Valid Values: Submitted | Approved | Rejected</p>
48
+ <p class="simpara">Default: None</p>
49
+ </td><td>
50
+ <p class="simpara">No</p>
51
+ </td></tr><tr><td>
52
+ <p class="simpara">
53
+ <em class="parameter"><code>AutoApprovalTime</code></em>
54
+ </p>
55
+ </td><td>
56
+ <p class="simpara"> If results have been submitted, <em class="parameter"><code>AutoApprovalTime</code></em>
57
+ is the date and time the results of the assignment results are considered
58
+ <span class="guilabel">Approved</span> automatically if they have not already been
59
+ explicitly approved or rejected by the Requester. This value is derived from
60
+ the auto-approval delay specified by the Requester in the HIT. This value is
61
+ omitted from the assignment if the Worker has not yet submitted results. </p>
62
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
63
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
64
+ <p class="simpara">Default: None</p>
65
+ </td><td>
66
+ <p class="simpara">No</p>
67
+ </td></tr><tr><td>
68
+ <p class="simpara">
69
+ <em class="parameter"><code>AcceptTime</code></em>
70
+ </p>
71
+ </td><td>
72
+ <p class="simpara">The date and time the Worker accepted the assignment.</p>
73
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
74
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
75
+ <p class="simpara">Default: None</p>
76
+ </td><td>
77
+ <p class="simpara">No</p>
78
+ </td></tr><tr><td>
79
+ <p class="simpara">
80
+ <em class="parameter"><code>SubmitTime</code></em>
81
+ </p>
82
+ </td><td>
83
+ <p class="simpara"> If the Worker has submitted results, <em class="parameter"><code>SubmitTime</code></em>
84
+ is the date and time the assignment was submitted. This value is omitted from
85
+ the assignment if the Worker has not yet submitted results. </p>
86
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
87
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
88
+ <p class="simpara">Default: None</p>
89
+ </td><td>
90
+ <p class="simpara">No</p>
91
+ </td></tr><tr><td>
92
+ <p class="simpara">
93
+ <em class="parameter"><code>ApprovalTime</code></em>
94
+ </p>
95
+ </td><td>
96
+ <p class="simpara"> If the Worker has submitted results and the Requester has approved the
97
+ results, <em class="parameter"><code>ApprovalTime</code></em> is the date and time the
98
+ Requester approved the results. This value is omitted from the assignment if
99
+ the Requester has not yet approved the results. </p>
100
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
101
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
102
+ <p class="simpara">Default: None</p>
103
+ </td><td>
104
+ <p class="simpara">No</p>
105
+ </td></tr><tr><td>
106
+ <p class="simpara">
107
+ <em class="parameter"><code>RejectionTime</code></em>
108
+ </p>
109
+ </td><td>
110
+ <p class="simpara"> If the Worker has submitted results and the Requester has rejected the
111
+ results, <em class="parameter"><code>RejectionTime</code></em> is the date and time the
112
+ Requester rejected the results. </p>
113
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
114
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
115
+ <p class="simpara"> Default: None. This value is omitted from the assignment if the
116
+ Requester has not yet rejected the results. </p>
117
+ </td><td>
118
+ <p class="simpara">No</p>
119
+ </td></tr><tr><td>
120
+ <p class="simpara">
121
+ <em class="parameter"><code>Deadline</code></em>
122
+ </p>
123
+ </td><td>
124
+ <p class="simpara"> The date and time of the deadline for the assignment. This value is
125
+ derived from the deadline specification for the HIT and the date and time the
126
+ Worker accepted the HIT. </p>
127
+ <p class="simpara"> Type: a <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time (Greenwich Mean
128
+ Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
129
+ <p class="simpara">Default: None</p>
130
+ </td><td>
131
+ <p class="simpara">No</p>
132
+ </td></tr><tr><td>
133
+ <p class="simpara">
134
+ <em class="parameter"><code>Answer</code></em>
135
+ </p>
136
+ </td><td>
137
+ <p class="simpara">No</p>
138
+ </td><td class="auto-generated">&nbsp;</td></tr><tr><td>
139
+ <p class="simpara">
140
+ <em class="parameter"><code>RequesterFeedback</code></em>
141
+ </p>
142
+ </td><td>
143
+ <p class="simpara"> The feedback string included with the call to the <a class="link" href="ApiReference_ApproveAssignmentOperation.html" title="ApproveAssignment">
144
+ ApproveAssignment</a> operation or the<a class="link" href="ApiReference_RejectAssignmentOperation.html" title="RejectAssignment"> RejectAssignment</a>
145
+ operation, if the Requester approved or rejected the assignment and specified
146
+ feedback. </p>
147
+ <p class="simpara">Type: String</p>
148
+ <p class="simpara"> Default: None. This field is not returned with assignment data by
149
+ default. To request this field, specify a response group of
150
+ <strong class="userinput"><code>AssignmentFeedback</code></strong>. </p>
151
+ </td><td>
152
+ <p class="simpara">No</p>
153
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e14134">Example</h2></div></div></div><p> The following example shows an Assignment data structure returned by the <a class="link" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT">GetAssignmentsForHIT</a> operation.
154
+ The <a class="link" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT">GetAssignmentsForHIT</a>
155
+ operaton returns zero or more <em class="parameter"><code>Assignment</code></em> elements for a
156
+ <span class="guilabel">Reviewable</span> HIT. </p><pre class="programlisting">
157
+ &lt;Assignment&gt;
158
+ &lt;AssignmentId&gt;123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE&lt;/AssignmentId&gt;
159
+ &lt;WorkerId&gt;AZ3456EXAMPLE&lt;/WorkerId&gt;
160
+ &lt;HITId&gt;123RVWYBAZW00EXAMPLE&lt;/HITId&gt;
161
+ &lt;AssignmentStatus&gt;Submitted&lt;/AssignmentStatus&gt;
162
+ &lt;Deadline&gt;2005-12-01T23:59:59Z&lt;/Deadline&gt;
163
+ &lt;AcceptTime&gt;2005-12-01T12:00:00Z&lt;/AcceptTime&gt;
164
+ &lt;SubmitTime&gt;2005-12-07T23:59:59Z&lt;/SubmitTime&gt;
165
+ &lt;Answer&gt;
166
+ &amp;lt;QuestionFormAnswers&amp;gt;
167
+ <em class="replaceable"><code>[XML-encoded Answer data]</code></em>
168
+ &amp;lt;/QuestionFormAnswers&amp;gt;
169
+ &lt;/Answer&gt;
170
+ &lt;/Assignment&gt;
171
+ </pre></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_DataStructuresArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_AssignmentDataStructureArticle">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_HITDataStructureArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>