Documentation ¶
Overview ¶
This package is in an experimental state, and does not currently follow conventions and style of the rest of goamz or common Go conventions. It must be polished before it's considered a first-class package in goamz.
Index ¶
- type CreateHITResponse
- type Error
- type ExternalQuestion
- type HIT
- type Locale
- type MTurk
- func (mt *MTurk) CreateHIT(title, description string, question ExternalQuestion, reward Price, ...) (h *HIT, err error)
- func (mt *MTurk) CreateHITOfType(hitTypeId string, q ExternalQuestion, lifetimeInSeconds uint, ...) (h *HIT, err error)
- func (mt *MTurk) SearchHITs() (s *SearchHITsResult, err error)
- type Price
- type QualificationRequirement
- type SearchHITsResponse
- type SearchHITsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateHITResponse ¶
The wrapper data structure returned by CreateHIT http://goo.gl/PskcX
type Error ¶
type Error struct { StatusCode int // HTTP status code (200, 403, ...) Code string // EC2 error code ("UnsupportedOperation", ...) Message string // The human-oriented error message RequestId string }
Error encapsulates an error returned by MTurk.
type ExternalQuestion ¶
type ExternalQuestion struct { XMLName xml.Name `xml:"http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd ExternalQuestion"` ExternalURL string FrameHeight int }
Data structure holding the contents of an "external" question. http://goo.gl/NP8Aa
type HIT ¶
type HIT struct { Request xmlRequest HITId string HITTypeId string CreationTime string Title string Description string Keywords string HITStatus string Reward Price LifetimeInSeconds uint AssignmentDurationInSeconds uint MaxAssignments uint AutoApprovalDelayInSeconds uint QualificationRequirement QualificationRequirement Question ExternalQuestion RequesterAnnotation string NumberofSimilarHITs uint HITReviewStatus string NumberOfAssignmentsPending uint NumberOfAssignmentsAvailable uint NumberOfAssignmentsCompleted uint }
The data structure representing a "human interface task" (HIT) Currently only supports "external" questions, because Go structs don't support union types. http://goo.gl/NP8Aa This type is returned, for example, from SearchHITs http://goo.gl/PskcX
type MTurk ¶
func (*MTurk) CreateHIT ¶
func (mt *MTurk) CreateHIT(title, description string, question ExternalQuestion, reward Price, assignmentDurationInSeconds, lifetimeInSeconds uint, keywords string, maxAssignments uint, qualificationRequirement *QualificationRequirement, requesterAnnotation string) (h *HIT, err error)
Corresponds to the "CreateHIT" operation of the Mechanical Turk API. http://goo.gl/cDBRc Currently only supports "external" questions (see "HIT" struct above). If "keywords", "maxAssignments", "qualificationRequirement" or "requesterAnnotation" are the zero value for their types, they will not be included in the request.
func (*MTurk) CreateHITOfType ¶
func (mt *MTurk) CreateHITOfType(hitTypeId string, q ExternalQuestion, lifetimeInSeconds uint, maxAssignments uint, requesterAnnotation string) (h *HIT, err error)
Corresponds to the "CreateHIT" operation of the Mechanical Turk API, using an existing "hit type". http://goo.gl/cDBRc Currently only supports "external" questions (see "HIT" struct above). If "maxAssignments" or "requesterAnnotation" are the zero value for their types, they will not be included in the request.
func (*MTurk) SearchHITs ¶
func (mt *MTurk) SearchHITs() (s *SearchHITsResult, err error)
Corresponds to "SearchHITs" operation of Mechanical Turk. http://goo.gl/PskcX Currenlty supports none of the optional parameters.
type Price ¶
Common price structure used in requests and responses http://goo.gl/tE4AV
type QualificationRequirement ¶
type QualificationRequirement struct { QualificationTypeId string Comparator string IntegerValue int LocaleValue Locale RequiredToPreview string }
Data structure used to specify requirements for the worker used in CreateHIT, for example http://goo.gl/LvRo9
type SearchHITsResponse ¶
type SearchHITsResponse struct { RequestId string `xml:"OperationRequest>RequestId"` SearchHITsResult SearchHITsResult }
The wrapper data structure returned by SearchHITs http://goo.gl/PskcX
type SearchHITsResult ¶
type SearchHITsResult struct { NumResults uint PageNumber uint TotalNumResults uint HITs []HIT `xml:"HIT"` }
The main data structure returned by SearchHITs http://goo.gl/PskcX