/AWS1/IF_MTU=>CREATEHITTYPE()¶
About CreateHITType¶
The CreateHITType operation creates a new HIT type. This operation
allows you to define a standard set of HIT properties to use when creating HITs.
If you register a HIT type with values that match an existing HIT type, the HIT type
ID of the existing type will be returned.
Method Signature¶
METHODS /AWS1/IF_MTU~CREATEHITTYPE
IMPORTING
!IV_AUTOAPPROVALDELAYINSECS TYPE /AWS1/MTULONG OPTIONAL
!IV_ASSIGNMENTDURINSECONDS TYPE /AWS1/MTULONG OPTIONAL
!IV_REWARD TYPE /AWS1/MTUCURRENCYAMOUNT OPTIONAL
!IV_TITLE TYPE /AWS1/MTUSTRING OPTIONAL
!IV_KEYWORDS TYPE /AWS1/MTUSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/MTUSTRING OPTIONAL
!IT_QUALIFICATIONREQUIREMENTS TYPE /AWS1/CL_MTUQUALIFICATIONREQ00=>TT_QUALIFICATIONREQUIREMENTLST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mtucreatehittypersp
RAISING
/AWS1/CX_MTUREQUESTERROR
/AWS1/CX_MTUSERVICEFAULT
/AWS1/CX_MTUCLIENTEXC
/AWS1/CX_MTUSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_assignmentdurinseconds TYPE /AWS1/MTULONG /AWS1/MTULONG¶
The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
iv_reward TYPE /AWS1/MTUCURRENCYAMOUNT /AWS1/MTUCURRENCYAMOUNT¶
The amount of money the Requester will pay a Worker for successfully completing the HIT.
iv_title TYPE /AWS1/MTUSTRING /AWS1/MTUSTRING¶
The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
iv_description TYPE /AWS1/MTUSTRING /AWS1/MTUSTRING¶
A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.
Optional arguments:¶
iv_autoapprovaldelayinsecs TYPE /AWS1/MTULONG /AWS1/MTULONG¶
The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
iv_keywords TYPE /AWS1/MTUSTRING /AWS1/MTUSTRING¶
One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
it_qualificationrequirements TYPE /AWS1/CL_MTUQUALIFICATIONREQ00=>TT_QUALIFICATIONREQUIREMENTLST TT_QUALIFICATIONREQUIREMENTLST¶
Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. Additionally, other actions can be restricted using the
ActionsGuardedfield on eachQualificationRequirementstructure.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mtucreatehittypersp /AWS1/CL_MTUCREATEHITTYPERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createhittype(
it_qualificationrequirements = VALUE /aws1/cl_mtuqualificationreq00=>tt_qualificationrequirementlst(
(
new /aws1/cl_mtuqualificationreq00(
it_integervalues = VALUE /aws1/cl_mtuintegerlist_w=>tt_integerlist(
( new /aws1/cl_mtuintegerlist_w( 123 ) )
)
it_localevalues = VALUE /aws1/cl_mtulocale=>tt_localelist(
(
new /aws1/cl_mtulocale(
iv_country = |string|
iv_subdivision = |string|
)
)
)
iv_actionsguarded = |string|
iv_comparator = |string|
iv_qualificationtypeid = |string|
iv_requiredtopreview = ABAP_TRUE
)
)
)
iv_assignmentdurinseconds = 123
iv_autoapprovaldelayinsecs = 123
iv_description = |string|
iv_keywords = |string|
iv_reward = |string|
iv_title = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_entityid = lo_result->get_hittypeid( ).
ENDIF.