Documentation
¶
Index ¶
- Constants
- type AnswerSpecification
- type Constraints
- type CreateHITResponse
- type FreeTextAnswer
- type GetAssignmentsForHITResponse
- type GetAssignmentsForHITResult
- type HIT
- type HTMLQuestion
- type HTMLQuestionContent
- type Length
- type Notification
- type Question
- type QuestionContent
- type QuestionForm
- type QuestionFormAnswers
- type ReceiveMessageResponse
- type SearchHITsResponse
- type SetHITTypeNotificationResponse
Constants ¶
View Source
const ( QUESTION_FORM_SCHEMA_URL = "http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd" HTML_QUESTION_SCHEMA_URL = "http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd" MAX_QUESTION_SIZE = 65535 // Specified by Amazon )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerSpecification ¶
type AnswerSpecification struct {
FreeTextAnswer FreeTextAnswer `xml:"FreeTextAnswer"`
}
type Constraints ¶
type Constraints struct {
Length Length `xml:"Length"`
}
type CreateHITResponse ¶
type CreateHITResponse struct {
XMLName xml.Name `xml:"CreateHITResponse"`
OperationRequest struct {
RequestId string
}
HIT struct {
Request struct {
IsValid bool
}
HITId string
HITTypeId string
}
}
func CreateHIT ¶
func CreateHIT(auth *aws.Auth, title string, description string, questionContentString, rewardAmount string, rewardCurrencyCode string, assignmentDuration int, lifetime time.Duration, keywords []string, autoApprovalDelay int, requesterAnnotation string, uniqueRequestToken string, responseGroup string) (*CreateHITResponse, error)
Create an HIT
type FreeTextAnswer ¶
type FreeTextAnswer struct {
Constraints Constraints `xml:"Constraints"`
DefaultText string `xml:"DefaultText"`
NumberOfLinesSuggestion int `xml:"NumberOfLinesSuggestion"`
}
type GetAssignmentsForHITResponse ¶
type GetAssignmentsForHITResponse struct {
XMLName xml.Name `xml:"GetAssignmentsForHITResponse"`
OperationRequest string
RequestId string
GetAssignmentsForHITResult GetAssignmentsForHITResult
}
func GetAssignmentsForHITOperation ¶
func GetAssignmentsForHITOperation(auth *aws.Auth, hitID string) (*GetAssignmentsForHITResponse, error)
GetAssignmentsForHITOperation fetches the assignment details for the HIT with id hitID
func (GetAssignmentsForHITResponse) GetAnswer ¶
func (r GetAssignmentsForHITResponse) GetAnswer() (*QuestionFormAnswers, error)
GetAnswer will unmarshal the string Answer into a native Go struct (This cannot be done at the same time that the parent struct is unmarshaled)
func (GetAssignmentsForHITResponse) GetAnswerText ¶
func (r GetAssignmentsForHITResponse) GetAnswerText() (result string, err error)
type GetAssignmentsForHITResult ¶
type GetAssignmentsForHITResult struct {
XMLName xml.Name `xml:"GetAssignmentsForHITResult"`
Request struct {
IsValid bool
}
NumResults int
TotalNumResults int
PageNumber int
Assignment struct {
AssignmentId string
WorkerId string
HITId string
AssignmentStatus string
AutoApprovalTime string
AcceptTime string
SubmitTime string
ApprovalTime string
Answer string
}
}
type HTMLQuestion ¶
type HTMLQuestion struct {
XMLName xml.Name `xml:"HTMLQuestion"`
Xmlns string `xml:"xmlns,attr"`
HTMLContent HTMLQuestionContent `xml:"HTMLContent"`
FrameHeight int `xml:"FrameHeight"`
}
func (HTMLQuestion) XML ¶
func (hq HTMLQuestion) XML() string
type HTMLQuestionContent ¶
type Notification ¶
type Question ¶
type Question struct {
QuestionIdentifier string `xml:"QuestionIdentifier"`
DisplayName string `xml:"DisplayName"`
IsRequired bool `xml:"IsRequired"`
QuestionContent QuestionContent `xml:"QuestionContent"`
AnswerSpecification AnswerSpecification `xml:"AnswerSpecification",omitempty`
}
type QuestionContent ¶
type QuestionContent struct {
Text string `xml:"Text"`
}
type QuestionForm ¶
type QuestionForm struct {
XMLName xml.Name `xml:"QuestionForm"`
Xmlns string `xml:"xmlns,attr"`
//Overview string `xml:"Overview"`
Question Question
}
func (QuestionForm) XML ¶
func (qf QuestionForm) XML() string
type QuestionFormAnswers ¶
type ReceiveMessageResponse ¶
type SearchHITsResponse ¶
type SearchHITsResponse struct {
XMLName xml.Name `xml:"SearchHITsResponse"`
Request struct {
IsValid bool
}
NumResults int
TotalNumResults int
PageNumber int
HIT []struct {
HITId string
HITTypeId string
CreationTime string
Title string
Description string
HITStatus string
Expiration string
NumberOfAssignmentsPending string
NumberOfAssignmentsAvailable string
NumberOfAssignmentsCompleted string
}
}
Click to show internal directories.
Click to hide internal directories.