mechturk: github.com/jjeffery/mechturk Index | Examples | Files | Directories

package mechturk

import "github.com/jjeffery/mechturk"

Package mechturk is a Go language SDK for the AWS Mechanical Turk web service.

The SDK is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI. To quote from the that website, Amazon Mechanical Turk is a web service that provides an on-demand, scalable, human workforce to complete jobs that humans can do better than computers, for example, recognizing objects in photos.

This package uses the SOAP API defined in WSDL. Some of the code has been auto-generated from the WSDL, which is located in the wsdl subdirectory.

Index

Examples

Package Files

client.go config.go doc.go error.go generate.go payload.go prettify.go wsdltypes.go

Constants

const Version = "2012-03-25"

Version is the protocol version supported by this package.

Variables

var DefaultConfig = &Config{}

DefaultConfig is the default configuration used if not explicitly specified.

func Prettify Uses

func Prettify(v interface{}) string

Prettify returns a string representation of the data structure v.

The current implementation uses the `awsutil.Prettify` function from the AWS SDK for Go (github.com/aws/aws-sdk-go).

type ApproveAssignmentRequest Uses

type ApproveAssignmentRequest struct {
    AssignmentId      string   `xml:"AssignmentId,omitempty"`
    ResponseGroup     []string `xml:"ResponseGroup,omitempty"`
    RequesterFeedback string   `xml:"RequesterFeedback,omitempty"`
}

type ApproveAssignmentResult Uses

type ApproveAssignmentResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type ApproveRejectedAssignmentRequest Uses

type ApproveRejectedAssignmentRequest struct {
    AssignmentId      string   `xml:"AssignmentId,omitempty"`
    ResponseGroup     []string `xml:"ResponseGroup,omitempty"`
    RequesterFeedback string   `xml:"RequesterFeedback,omitempty"`
}

type ApproveRejectedAssignmentResult Uses

type ApproveRejectedAssignmentResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type Arguments Uses

type Arguments struct {
    Argument struct {
        Name  string `xml:"Name,attr,omitempty"`
        Value string `xml:"Value,attr,omitempty"`
    } `xml:"Argument,omitempty"`
}

type AssignQualificationRequest Uses

type AssignQualificationRequest struct {
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    WorkerId            string   `xml:"WorkerId,omitempty"`
    IntegerValue        int32    `xml:"IntegerValue,omitempty"`
    SendNotification    bool     `xml:"SendNotification,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type AssignQualificationResult Uses

type AssignQualificationResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type Assignment Uses

type Assignment struct {
    Request           *Request          `xml:"Request,omitempty"`
    AssignmentId      string            `xml:"AssignmentId,omitempty"`
    WorkerId          string            `xml:"WorkerId,omitempty"`
    HITId             string            `xml:"HITId,omitempty"`
    AssignmentStatus  *AssignmentStatus `xml:"AssignmentStatus,omitempty"`
    AutoApprovalTime  time.Time         `xml:"AutoApprovalTime,omitempty"`
    AcceptTime        time.Time         `xml:"AcceptTime,omitempty"`
    SubmitTime        time.Time         `xml:"SubmitTime,omitempty"`
    ApprovalTime      time.Time         `xml:"ApprovalTime,omitempty"`
    RejectionTime     time.Time         `xml:"RejectionTime,omitempty"`
    Deadline          time.Time         `xml:"Deadline,omitempty"`
    Answer            string            `xml:"Answer,omitempty"`
    RequesterFeedback string            `xml:"RequesterFeedback,omitempty"`
}

type AssignmentStatus Uses

type AssignmentStatus string
const (
    AssignmentStatusSubmitted AssignmentStatus = "Submitted"
    AssignmentStatusApproved  AssignmentStatus = "Approved"
    AssignmentStatusRejected  AssignmentStatus = "Rejected"
)

type BlockWorkerRequest Uses

type BlockWorkerRequest struct {
    WorkerId      string   `xml:"WorkerId,omitempty"`
    Reason        string   `xml:"Reason,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type BlockWorkerResult Uses

type BlockWorkerResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type BonusPayment Uses

type BonusPayment struct {
    Request      *Request  `xml:"Request,omitempty"`
    WorkerId     string    `xml:"WorkerId,omitempty"`
    BonusAmount  *Price    `xml:"BonusAmount,omitempty"`
    AssignmentId string    `xml:"AssignmentId,omitempty"`
    Reason       string    `xml:"Reason,omitempty"`
    GrantTime    time.Time `xml:"GrantTime,omitempty"`
}

type ChangeHITTypeOfHITRequest Uses

type ChangeHITTypeOfHITRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    HITTypeId     string   `xml:"HITTypeId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type ChangeHITTypeOfHITResult Uses

type ChangeHITTypeOfHITResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type Claim Uses

type Claim struct {
    Type string `xml:"Type,omitempty"`
    Body string `xml:"Body,omitempty"`
}

type Comparator Uses

type Comparator string
const (
    ComparatorLessThan             Comparator = "LessThan"
    ComparatorLessThanOrEqualTo    Comparator = "LessThanOrEqualTo"
    ComparatorGreaterThan          Comparator = "GreaterThan"
    ComparatorGreaterThanOrEqualTo Comparator = "GreaterThanOrEqualTo"
    ComparatorEqualTo              Comparator = "EqualTo"
    ComparatorNotEqualTo           Comparator = "NotEqualTo"
    ComparatorExists               Comparator = "Exists"
)

type Config Uses

type Config struct {
    // The credentials object to use when signing requests. Defaults to
    // a chain of credential providers to search for credentials in environment
    // variables and the shared credential file.
    Credentials *credentials.Credentials

    // Sandbox indicates whether to use the AWS Mechanical Turk Sandbox.
    // If Endpoint is set, then it overrides this setting.
    Sandbox *bool

    // Endpoint for accessing Mechanical Turk. If set, overrides
    // the Sandbox setting.
    Endpoint *string

    // Logger for diagnostics
    Logger *log.Logger
}

A Config provides configuration for AWS Mechanical Turk clients.

func (*Config) Clone Uses

func (c *Config) Clone() *Config

Clone returns a deep copy of the Config.

func (*Config) Merge Uses

func (c *Config) Merge(other *Config) *Config

Merge returns a deep copy of the config merged with the other config.

func (*Config) WithCredentials Uses

func (c *Config) WithCredentials(cred *credentials.Credentials) *Config

WithCredentials returns a copy of the config with the credentials set.

func (*Config) WithSandbox Uses

func (c *Config) WithSandbox(sandbox bool) *Config

WithSandbox returns a copy of the config with the sandbox setting.

type CreateHITRequest Uses

type CreateHITRequest struct {
    HITTypeId                   string                      `xml:"HITTypeId,omitempty"`
    MaxAssignments              int                         `xml:"MaxAssignments,omitempty"`
    AutoApprovalDelayInSeconds  int                         `xml:"AutoApprovalDelayInSeconds,omitempty"`
    LifetimeInSeconds           int                         `xml:"LifetimeInSeconds,omitempty"`
    AssignmentDurationInSeconds int                         `xml:"AssignmentDurationInSeconds,omitempty"`
    Reward                      *Price                      `xml:"Reward,omitempty"`
    Title                       string                      `xml:"Title,omitempty"`
    Keywords                    string                      `xml:"Keywords,omitempty"`
    Description                 string                      `xml:"Description,omitempty"`
    Question                    string                      `xml:"Question,omitempty"`
    RequesterAnnotation         string                      `xml:"RequesterAnnotation,omitempty"`
    QualificationRequirement    []*QualificationRequirement `xml:"QualificationRequirement,omitempty"`
    UniqueRequestToken          string                      `xml:"UniqueRequestToken,omitempty"`
    AssignmentReviewPolicy      *ReviewPolicy               `xml:"AssignmentReviewPolicy,omitempty"`
    HITReviewPolicy             *ReviewPolicy               `xml:"HITReviewPolicy,omitempty"`
    HITLayoutId                 string                      `xml:"HITLayoutId,omitempty"`
    HITLayoutParameter          []*HITLayoutParameter       `xml:"HITLayoutParameter,omitempty"`
    ResponseGroup               []string                    `xml:"ResponseGroup,omitempty"`
}

CreateHITRequest is the input to CreateHIT, which is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_CreateHITOperation.html.

type CreateQualificationTypeRequest Uses

type CreateQualificationTypeRequest struct {
    Name                    string                   `xml:"Name,omitempty"`
    Keywords                string                   `xml:"Keywords,omitempty"`
    Description             string                   `xml:"Description,omitempty"`
    QualificationTypeStatus *QualificationTypeStatus `xml:"QualificationTypeStatus,omitempty"`
    RetryDelayInSeconds     int                      `xml:"RetryDelayInSeconds,omitempty"`
    Test                    string                   `xml:"Test,omitempty"`
    AnswerKey               string                   `xml:"AnswerKey,omitempty"`
    TestDurationInSeconds   int                      `xml:"TestDurationInSeconds,omitempty"`
    AutoGranted             bool                     `xml:"AutoGranted,omitempty"`
    AutoGrantedValue        int32                    `xml:"AutoGrantedValue,omitempty"`
    ResponseGroup           []string                 `xml:"ResponseGroup,omitempty"`
}

type DataPoint Uses

type DataPoint struct {
    Date        time.Time `xml:"Date,omitempty"`
    LongValue   int64     `xml:"LongValue,omitempty"`
    DoubleValue float64   `xml:"DoubleValue,omitempty"`
}

type DisableHITRequest Uses

type DisableHITRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type DisableHITResult Uses

type DisableHITResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type DisposeHITRequest Uses

type DisposeHITRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type DisposeHITResult Uses

type DisposeHITResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type DisposeQualificationTypeRequest Uses

type DisposeQualificationTypeRequest struct {
    QualificationTypeId string `xml:"QualificationTypeId,omitempty"`
}

type DisposeQualificationTypeResult Uses

type DisposeQualificationTypeResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type Errors Uses

type Errors struct {
    Error struct {
        Code    string          `xml:"Code,omitempty"`
        Message string          `xml:"Message,omitempty"`
        Data    []*KeyValuePair `xml:"Data,omitempty"`
    } `xml:"Error,omitempty"`
}

type EventType Uses

type EventType string
const (
    EventTypeAssignmentAccepted  EventType = "AssignmentAccepted"
    EventTypeAssignmentAbandoned EventType = "AssignmentAbandoned"
    EventTypeAssignmentReturned  EventType = "AssignmentReturned"
    EventTypeAssignmentSubmitted EventType = "AssignmentSubmitted"
    EventTypeHITReviewable       EventType = "HITReviewable"
    EventTypeHITExpired          EventType = "HITExpired"
    EventTypePing                EventType = "Ping"
)

type ExtendHITRequest Uses

type ExtendHITRequest struct {
    HITId                        string   `xml:"HITId,omitempty"`
    MaxAssignmentsIncrement      int      `xml:"MaxAssignmentsIncrement,omitempty"`
    ExpirationIncrementInSeconds int      `xml:"ExpirationIncrementInSeconds,omitempty"`
    UniqueRequestToken           string   `xml:"UniqueRequestToken,omitempty"`
    ResponseGroup                []string `xml:"ResponseGroup,omitempty"`
}

type ExtendHITResult Uses

type ExtendHITResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type ForceExpireHITRequest Uses

type ForceExpireHITRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type ForceExpireHITResult Uses

type ForceExpireHITResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type GetAccountBalanceRequest Uses

type GetAccountBalanceRequest struct {
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
    Unused        string   `xml:"Unused,omitempty"`
}

type GetAccountBalanceResult Uses

type GetAccountBalanceResult struct {
    Request          *Request `xml:"Request,omitempty"`
    AvailableBalance *Price   `xml:"AvailableBalance,omitempty"`
    OnHoldBalance    *Price   `xml:"OnHoldBalance,omitempty"`
}

type GetAssignmentRequest Uses

type GetAssignmentRequest struct {
    AssignmentId  string   `xml:"AssignmentId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type GetAssignmentResult Uses

type GetAssignmentResult struct {
    Request    *Request    `xml:"Request,omitempty"`
    Assignment *Assignment `xml:"Assignment,omitempty"`
    HIT        *HIT        `xml:"HIT,omitempty"`
}

type GetAssignmentsForHITRequest Uses

type GetAssignmentsForHITRequest struct {
    HITId            string                            `xml:"HITId,omitempty"`
    SortDirection    *SortDirection                    `xml:"SortDirection,omitempty"`
    SortProperty     *GetAssignmentsForHITSortProperty `xml:"SortProperty,omitempty"`
    PageNumber       int                               `xml:"PageNumber,omitempty"`
    PageSize         int                               `xml:"PageSize,omitempty"`
    AssignmentStatus []*AssignmentStatus               `xml:"AssignmentStatus,omitempty"`
    ResponseGroup    []string                          `xml:"ResponseGroup,omitempty"`
}

type GetAssignmentsForHITResult Uses

type GetAssignmentsForHITResult struct {
    Request         *Request      `xml:"Request,omitempty"`
    PageNumber      int           `xml:"PageNumber,omitempty"`
    NumResults      int           `xml:"NumResults,omitempty"`
    TotalNumResults int           `xml:"TotalNumResults,omitempty"`
    Assignment      []*Assignment `xml:"Assignment,omitempty"`
}

type GetAssignmentsForHITSortProperty Uses

type GetAssignmentsForHITSortProperty string
const (
    GetAssignmentsForHITSortPropertyAcceptTime       GetAssignmentsForHITSortProperty = "AcceptTime"
    GetAssignmentsForHITSortPropertySubmitTime       GetAssignmentsForHITSortProperty = "SubmitTime"
    GetAssignmentsForHITSortPropertyAnswer           GetAssignmentsForHITSortProperty = "Answer"
    GetAssignmentsForHITSortPropertyAssignmentStatus GetAssignmentsForHITSortProperty = "AssignmentStatus"
)

type GetBlockedWorkersRequest Uses

type GetBlockedWorkersRequest struct {
    PageNumber    int      `xml:"PageNumber,omitempty"`
    PageSize      int      `xml:"PageSize,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type GetBlockedWorkersResult Uses

type GetBlockedWorkersResult struct {
    Request         *Request       `xml:"Request,omitempty"`
    PageNumber      int            `xml:"PageNumber,omitempty"`
    NumResults      int            `xml:"NumResults,omitempty"`
    TotalNumResults int            `xml:"TotalNumResults,omitempty"`
    WorkerBlock     []*WorkerBlock `xml:"WorkerBlock,omitempty"`
}

type GetBonusPaymentsRequest Uses

type GetBonusPaymentsRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    AssignmentId  string   `xml:"AssignmentId,omitempty"`
    PageNumber    int      `xml:"PageNumber,omitempty"`
    PageSize      int      `xml:"PageSize,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type GetBonusPaymentsResult Uses

type GetBonusPaymentsResult struct {
    Request         *Request        `xml:"Request,omitempty"`
    NumResults      int             `xml:"NumResults,omitempty"`
    PageNumber      int             `xml:"PageNumber,omitempty"`
    TotalNumResults int             `xml:"TotalNumResults,omitempty"`
    BonusPayment    []*BonusPayment `xml:"BonusPayment,omitempty"`
}

type GetFileUploadURLRequest Uses

type GetFileUploadURLRequest struct {
    AssignmentId       string `xml:"AssignmentId,omitempty"`
    QuestionIdentifier string `xml:"QuestionIdentifier,omitempty"`
}

type GetFileUploadURLResult Uses

type GetFileUploadURLResult struct {
    Request       *Request `xml:"Request,omitempty"`
    FileUploadURL string   `xml:"FileUploadURL,omitempty"`
}

type GetHITRequest Uses

type GetHITRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type GetHITsForQualificationTypeRequest Uses

type GetHITsForQualificationTypeRequest struct {
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    PageNumber          int      `xml:"PageNumber,omitempty"`
    PageSize            int      `xml:"PageSize,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type GetHITsForQualificationTypeResult Uses

type GetHITsForQualificationTypeResult struct {
    Request         *Request `xml:"Request,omitempty"`
    PageNumber      int      `xml:"PageNumber,omitempty"`
    NumResults      int      `xml:"NumResults,omitempty"`
    TotalNumResults int      `xml:"TotalNumResults,omitempty"`
    HIT             []*HIT   `xml:"HIT,omitempty"`
}

type GetQualificationRequestsRequest Uses

type GetQualificationRequestsRequest struct {
    QualificationTypeId string                                `xml:"QualificationTypeId,omitempty"`
    SortDirection       *SortDirection                        `xml:"SortDirection,omitempty"`
    SortProperty        *GetQualificationRequestsSortProperty `xml:"SortProperty,omitempty"`
    PageNumber          int                                   `xml:"PageNumber,omitempty"`
    PageSize            int                                   `xml:"PageSize,omitempty"`
    ResponseGroup       []string                              `xml:"ResponseGroup,omitempty"`
}

type GetQualificationRequestsResult Uses

type GetQualificationRequestsResult struct {
    Request              *Request                `xml:"Request,omitempty"`
    NumResults           int                     `xml:"NumResults,omitempty"`
    TotalNumResults      int                     `xml:"TotalNumResults,omitempty"`
    PageNumber           int                     `xml:"PageNumber,omitempty"`
    QualificationRequest []*QualificationRequest `xml:"QualificationRequest,omitempty"`
}

type GetQualificationRequestsSortProperty Uses

type GetQualificationRequestsSortProperty string
const (
    GetQualificationRequestsSortPropertyQualificationTypeId GetQualificationRequestsSortProperty = "QualificationTypeId"
    GetQualificationRequestsSortPropertySubmitTime          GetQualificationRequestsSortProperty = "SubmitTime"
)

type GetQualificationScoreRequest Uses

type GetQualificationScoreRequest struct {
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    SubjectId           string   `xml:"SubjectId,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type GetQualificationTypeRequest Uses

type GetQualificationTypeRequest struct {
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type GetQualificationsForQualificationTypeRequest Uses

type GetQualificationsForQualificationTypeRequest struct {
    QualificationTypeId string               `xml:"QualificationTypeId,omitempty"`
    Status              *QualificationStatus `xml:"Status,omitempty"`
    PageNumber          int                  `xml:"PageNumber,omitempty"`
    PageSize            int                  `xml:"PageSize,omitempty"`
    ResponseGroup       []string             `xml:"ResponseGroup,omitempty"`
}

type GetQualificationsForQualificationTypeResult Uses

type GetQualificationsForQualificationTypeResult struct {
    Request         *Request         `xml:"Request,omitempty"`
    PageNumber      int              `xml:"PageNumber,omitempty"`
    NumResults      int              `xml:"NumResults,omitempty"`
    TotalNumResults int              `xml:"TotalNumResults,omitempty"`
    Qualification   []*Qualification `xml:"Qualification,omitempty"`
}

type GetRequesterStatisticRequest Uses

type GetRequesterStatisticRequest struct {
    Statistic     *RequesterStatistic `xml:"Statistic,omitempty"`
    TimePeriod    *TimePeriod         `xml:"TimePeriod,omitempty"`
    Count         int                 `xml:"Count,omitempty"`
    ResponseGroup []string            `xml:"ResponseGroup,omitempty"`
}

type GetRequesterWorkerStatisticRequest Uses

type GetRequesterWorkerStatisticRequest struct {
    Statistic     *RequesterStatistic `xml:"Statistic,omitempty"`
    TimePeriod    *TimePeriod         `xml:"TimePeriod,omitempty"`
    WorkerId      string              `xml:"WorkerId,omitempty"`
    Count         int                 `xml:"Count,omitempty"`
    ResponseGroup []string            `xml:"ResponseGroup,omitempty"`
}

type GetReviewResultsForHITRequest Uses

type GetReviewResultsForHITRequest struct {
    HITId           string               `xml:"HITId,omitempty"`
    PolicyLevel     []*ReviewPolicyLevel `xml:"PolicyLevel,omitempty"`
    RetrieveActions bool                 `xml:"RetrieveActions,omitempty"`
    RetrieveResults bool                 `xml:"RetrieveResults,omitempty"`
    PageNumber      int                  `xml:"PageNumber,omitempty"`
    PageSize        int                  `xml:"PageSize,omitempty"`
    ResponseGroup   []string             `xml:"ResponseGroup,omitempty"`
}

type GetReviewResultsForHITResult Uses

type GetReviewResultsForHITResult struct {
    Request                *Request      `xml:"Request,omitempty"`
    HITId                  string        `xml:"HITId,omitempty"`
    AssignmentReviewPolicy *ReviewPolicy `xml:"AssignmentReviewPolicy,omitempty"`
    HITReviewPolicy        *ReviewPolicy `xml:"HITReviewPolicy,omitempty"`
    AssignmentReviewReport *ReviewReport `xml:"AssignmentReviewReport,omitempty"`
    HITReviewReport        *ReviewReport `xml:"HITReviewReport,omitempty"`
}

type GetReviewableHITsRequest Uses

type GetReviewableHITsRequest struct {
    HITTypeId     string                         `xml:"HITTypeId,omitempty"`
    Status        *ReviewableHITStatus           `xml:"Status,omitempty"`
    SortDirection *SortDirection                 `xml:"SortDirection,omitempty"`
    SortProperty  *GetReviewableHITsSortProperty `xml:"SortProperty,omitempty"`
    PageNumber    int                            `xml:"PageNumber,omitempty"`
    PageSize      int                            `xml:"PageSize,omitempty"`
    ResponseGroup []string                       `xml:"ResponseGroup,omitempty"`
}

type GetReviewableHITsResult Uses

type GetReviewableHITsResult struct {
    Request         *Request `xml:"Request,omitempty"`
    PageNumber      int      `xml:"PageNumber,omitempty"`
    NumResults      int      `xml:"NumResults,omitempty"`
    TotalNumResults int      `xml:"TotalNumResults,omitempty"`
    HIT             []*HIT   `xml:"HIT,omitempty"`
}

type GetReviewableHITsSortProperty Uses

type GetReviewableHITsSortProperty string
const (
    GetReviewableHITsSortPropertyTitle        GetReviewableHITsSortProperty = "Title"
    GetReviewableHITsSortPropertyReward       GetReviewableHITsSortProperty = "Reward"
    GetReviewableHITsSortPropertyExpiration   GetReviewableHITsSortProperty = "Expiration"
    GetReviewableHITsSortPropertyCreationTime GetReviewableHITsSortProperty = "CreationTime"
    GetReviewableHITsSortPropertyEnumeration  GetReviewableHITsSortProperty = "Enumeration"
)

type GetStatisticResult Uses

type GetStatisticResult struct {
    Request    *Request            `xml:"Request,omitempty"`
    DataPoint  []*DataPoint        `xml:"DataPoint,omitempty"`
    Statistic  *RequesterStatistic `xml:"Statistic,omitempty"`
    TimePeriod *TimePeriod         `xml:"TimePeriod,omitempty"`
    WorkerId   string              `xml:"WorkerId,omitempty"`
}

type GrantBonusRequest Uses

type GrantBonusRequest struct {
    WorkerId           string   `xml:"WorkerId,omitempty"`
    BonusAmount        *Price   `xml:"BonusAmount,omitempty"`
    AssignmentId       string   `xml:"AssignmentId,omitempty"`
    Reason             string   `xml:"Reason,omitempty"`
    UniqueRequestToken string   `xml:"UniqueRequestToken,omitempty"`
    ResponseGroup      []string `xml:"ResponseGroup,omitempty"`
}

type GrantBonusResult Uses

type GrantBonusResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type GrantQualificationRequest Uses

type GrantQualificationRequest struct {
    QualificationRequestId string   `xml:"QualificationRequestId,omitempty"`
    IntegerValue           int32    `xml:"IntegerValue,omitempty"`
    ResponseGroup          []string `xml:"ResponseGroup,omitempty"`
}

type GrantQualificationResult Uses

type GrantQualificationResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type HIT Uses

type HIT struct {
    Request                      *Request                    `xml:"Request,omitempty"`
    HITId                        string                      `xml:"HITId,omitempty"`
    HITTypeId                    string                      `xml:"HITTypeId,omitempty"`
    HITGroupId                   string                      `xml:"HITGroupId,omitempty"`
    HITLayoutId                  string                      `xml:"HITLayoutId,omitempty"`
    CreationTime                 time.Time                   `xml:"CreationTime,omitempty"`
    Title                        string                      `xml:"Title,omitempty"`
    Description                  string                      `xml:"Description,omitempty"`
    Question                     string                      `xml:"Question,omitempty"`
    Keywords                     string                      `xml:"Keywords,omitempty"`
    HITStatus                    *HITStatus                  `xml:"HITStatus,omitempty"`
    MaxAssignments               int                         `xml:"MaxAssignments,omitempty"`
    Reward                       *Price                      `xml:"Reward,omitempty"`
    AutoApprovalDelayInSeconds   int                         `xml:"AutoApprovalDelayInSeconds,omitempty"`
    Expiration                   time.Time                   `xml:"Expiration,omitempty"`
    AssignmentDurationInSeconds  int                         `xml:"AssignmentDurationInSeconds,omitempty"`
    RequesterAnnotation          string                      `xml:"RequesterAnnotation,omitempty"`
    QualificationRequirement     []*QualificationRequirement `xml:"QualificationRequirement,omitempty"`
    HITReviewStatus              *HITReviewStatus            `xml:"HITReviewStatus,omitempty"`
    NumberOfAssignmentsPending   int                         `xml:"NumberOfAssignmentsPending,omitempty"`
    NumberOfAssignmentsAvailable int                         `xml:"NumberOfAssignmentsAvailable,omitempty"`
    NumberOfAssignmentsCompleted int                         `xml:"NumberOfAssignmentsCompleted,omitempty"`
}

type HITLayoutParameter Uses

type HITLayoutParameter struct {
    Name  string `xml:"Name,omitempty"`
    Value string `xml:"Value,omitempty"`
}

type HITReviewStatus Uses

type HITReviewStatus string
const (
    HITReviewStatusNotReviewed           HITReviewStatus = "NotReviewed"
    HITReviewStatusMarkedForReview       HITReviewStatus = "MarkedForReview"
    HITReviewStatusReviewedAppropriate   HITReviewStatus = "ReviewedAppropriate"
    HITReviewStatusReviewedInappropriate HITReviewStatus = "ReviewedInappropriate"
)

type HITStatus Uses

type HITStatus string
const (
    HITStatusAssignable   HITStatus = "Assignable"
    HITStatusUnassignable HITStatus = "Unassignable"
    HITStatusReviewable   HITStatus = "Reviewable"
    HITStatusReviewing    HITStatus = "Reviewing"
    HITStatusDisposed     HITStatus = "Disposed"
)

type HTTPHeaders Uses

type HTTPHeaders struct {
    Header struct {
        Name  string `xml:"Name,attr,omitempty"`
        Value string `xml:"Value,attr,omitempty"`
    } `xml:"Header,omitempty"`
}

type HelpRequest Uses

type HelpRequest struct {
    About    []string `xml:"About,omitempty"`
    HelpType struct {
    }   `xml:"HelpType,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type Information Uses

type Information struct {
    Request                  *Request                    `xml:"Request,omitempty"`
    OperationInformation     []*OperationInformation     `xml:"OperationInformation,omitempty"`
    ResponseGroupInformation []*ResponseGroupInformation `xml:"ResponseGroupInformation,omitempty"`
}

type KeyValuePair Uses

type KeyValuePair struct {
    Key   string `xml:"Key,omitempty"`
    Value string `xml:"Value,omitempty"`
}

type Locale Uses

type Locale struct {
    Country string `xml:"Country,omitempty"`
}

type MechTurk Uses

type MechTurk struct {
    Config *Config
}

MechTurk is an AWS Mechanical Turk Requester client.

func New Uses

func New(configs ...*Config) *MechTurk

New returns a new AWS Mechanical Turk Requester client.

func (*MechTurk) ApproveAssignment Uses

func (mt *MechTurk) ApproveAssignment(request *ApproveAssignmentRequest) (*ApproveAssignmentResult, error)

ApproveAssignment is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ApproveAssignmentOperation.html.

func (*MechTurk) ApproveRejectedAssignment Uses

func (mt *MechTurk) ApproveRejectedAssignment(request *ApproveRejectedAssignmentRequest) (*ApproveRejectedAssignmentResult, error)

ApproveRejectedAssignment is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ApproveRejectedAssignmentOperation.html.

func (*MechTurk) AssignQualification Uses

func (mt *MechTurk) AssignQualification(request *AssignQualificationRequest) (*AssignQualificationResult, error)

AssignQualification is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_AssignQualificationOperation.html.

func (*MechTurk) BlockWorker Uses

func (mt *MechTurk) BlockWorker(request *BlockWorkerRequest) (*BlockWorkerResult, error)

BlockWorker is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_BlockWorkerOperation.html.

func (*MechTurk) ChangeHITTypeOfHIT Uses

func (mt *MechTurk) ChangeHITTypeOfHIT(request *ChangeHITTypeOfHITRequest) (*ChangeHITTypeOfHITResult, error)

ChangeHITTypeOfHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ChangeHITTypeOfHITOperation.html.

func (*MechTurk) CreateHIT Uses

func (mt *MechTurk) CreateHIT(request *CreateHITRequest) (*HIT, error)

CreateHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_CreateHITOperation.html.

func (*MechTurk) CreateQualificationType Uses

func (mt *MechTurk) CreateQualificationType(request *CreateQualificationTypeRequest) (*QualificationType, error)

CreateQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_CreateQualificationTypeOperation.html.

func (*MechTurk) DisableHIT Uses

func (mt *MechTurk) DisableHIT(request *DisableHITRequest) (*DisableHITResult, error)

DisableHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_DisableHITOperation.html.

func (*MechTurk) DisposeHIT Uses

func (mt *MechTurk) DisposeHIT(request *DisposeHITRequest) (*DisposeHITResult, error)

DisposeHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_DisposeHITOperation.html.

func (*MechTurk) DisposeQualificationType Uses

func (mt *MechTurk) DisposeQualificationType(request *DisposeQualificationTypeRequest) (*DisposeQualificationTypeResult, error)

DisposeQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_DisposeQualificationTypeOperation.html.

func (*MechTurk) ExtendHIT Uses

func (c *MechTurk) ExtendHIT(request *ExtendHITRequest) (*ExtendHITResult, error)

ExtendHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ExtendHITOperation.html.

func (*MechTurk) ForceExpireHIT Uses

func (mt *MechTurk) ForceExpireHIT(request *ForceExpireHITRequest) (*ForceExpireHITResult, error)

ForceExpireHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ForceExpireHITOperation.html.

func (*MechTurk) GetAccountBalance Uses

func (mt *MechTurk) GetAccountBalance(request *GetAccountBalanceRequest) (*GetAccountBalanceResult, error)

GetAccountBalance is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetAccountBalanceOperation.html.

Code:

mt := mechturk.New()
result, err := mt.GetAccountBalance(&mechturk.GetAccountBalanceRequest{})
if err != nil {
    log.Fatal(err)
}
log.Println(mechturk.Prettify(result))

func (*MechTurk) GetAssignment Uses

func (mt *MechTurk) GetAssignment(request *GetAssignmentRequest) (*GetAssignmentResult, error)

GetAssignment is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetAssignmentOperation.html.

func (*MechTurk) GetAssignmentsForHIT Uses

func (mt *MechTurk) GetAssignmentsForHIT(request *GetAssignmentsForHITRequest) (*GetAssignmentsForHITResult, error)

GetAssignmentsForHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetAssignmentsForHITOperation.html.

func (*MechTurk) GetBlockedWorkers Uses

func (mt *MechTurk) GetBlockedWorkers(request *GetBlockedWorkersRequest) (*GetBlockedWorkersResult, error)

GetBlockedWorkers is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetBlockedWorkersOperation.html.

func (*MechTurk) GetBonusPayments Uses

func (mt *MechTurk) GetBonusPayments(request *GetBonusPaymentsRequest) (*GetBonusPaymentsResult, error)

GetBonusPayments is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetBonusPaymentsOperation.html.

func (*MechTurk) GetFileUploadURL Uses

func (mt *MechTurk) GetFileUploadURL(request *GetFileUploadURLRequest) (*GetFileUploadURLResult, error)

GetFileUploadURL is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetFileUploadURLOperation.html.

func (*MechTurk) GetHIT Uses

func (mt *MechTurk) GetHIT(request *GetHITRequest) (*HIT, error)

GetHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetHITOperation.html.

func (*MechTurk) GetHITsForQualificationType Uses

func (mt *MechTurk) GetHITsForQualificationType(request *GetHITsForQualificationTypeRequest) (*GetHITsForQualificationTypeResult, error)

GetHITsForQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetHITsForQualificationTypeOperation.html.

func (*MechTurk) GetQualificationRequests Uses

func (mt *MechTurk) GetQualificationRequests(request *GetQualificationRequestsRequest) (*GetQualificationRequestsResult, error)

GetQualificationRequests is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetQualificationRequestsOperation.html.

func (*MechTurk) GetQualificationScore Uses

func (mt *MechTurk) GetQualificationScore(request *GetQualificationScoreRequest) (*Qualification, error)

GetQualificationScore is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetQualificationScoreOperation.html.

func (*MechTurk) GetQualificationType Uses

func (mt *MechTurk) GetQualificationType(request *GetQualificationTypeRequest) (*QualificationType, error)

GetQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetQualificationTypeOperation.html.

func (*MechTurk) GetQualificationsForQualificationType Uses

func (mt *MechTurk) GetQualificationsForQualificationType(request *GetQualificationsForQualificationTypeRequest) (*GetQualificationsForQualificationTypeResult, error)

GetQualificationsForQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetQualificationsForQualificationTypeOperation.html.

func (*MechTurk) GetRequesterStatistic Uses

func (mt *MechTurk) GetRequesterStatistic(request *GetRequesterStatisticRequest) (*GetStatisticResult, error)

GetRequesterStatistic is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetRequesterStatisticOperation.html.

func (*MechTurk) GetRequesterWorkerStatistic Uses

func (mt *MechTurk) GetRequesterWorkerStatistic(request *GetRequesterWorkerStatisticRequest) (*GetStatisticResult, error)

GetRequesterWorkerStatistic is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetRequesterWorkerStatisticOperation.html.

func (*MechTurk) GetReviewResultsForHIT Uses

func (mt *MechTurk) GetReviewResultsForHIT(request *GetReviewResultsForHITRequest) (*GetReviewResultsForHITResult, error)

GetReviewResultsForHIT is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetReviewResultsForHitOperation.html.

func (*MechTurk) GetReviewableHITs Uses

func (mt *MechTurk) GetReviewableHITs(request *GetReviewableHITsRequest) (*GetReviewableHITsResult, error)

GetReviewableHITs is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetReviewableHITsOperation.html.

func (*MechTurk) GrantBonus Uses

func (mt *MechTurk) GrantBonus(request *GrantBonusRequest) (*GrantBonusResult, error)

GrantBonus is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GrantBonusOperation.html.

func (*MechTurk) GrantQualification Uses

func (mt *MechTurk) GrantQualification(request *GrantQualificationRequest) (*GrantQualificationResult, error)

GrantQualification is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GrantQualificationOperation.html.

func (*MechTurk) Help Uses

func (mt *MechTurk) Help(request *HelpRequest) (*Information, error)

Help is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_HelpOperation.html.

func (*MechTurk) NotifyWorkers Uses

func (mt *MechTurk) NotifyWorkers(request *NotifyWorkersRequest) (*NotifyWorkersResult, error)

NotifyWorkers is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_NotifyWorkersOperation.html.

func (*MechTurk) RegisterHITType Uses

func (mt *MechTurk) RegisterHITType(request *RegisterHITTypeRequest) (*RegisterHITTypeResult, error)

RegisterHITType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_RegisterHITTypeOperation.html.

func (*MechTurk) RejectAssignment Uses

func (mt *MechTurk) RejectAssignment(request *RejectAssignmentRequest) (*RejectAssignmentResult, error)

RejectAssignment is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_RejectAssignmentOperation.html.

func (*MechTurk) RejectQualificationRequest Uses

func (mt *MechTurk) RejectQualificationRequest(request *RejectQualificationRequestRequest) (*RejectQualificationRequestResult, error)

RejectQualificationRequest is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_RejectQualificationRequestOperation.html.

func (*MechTurk) RevokeQualification Uses

func (mt *MechTurk) RevokeQualification(request *RevokeQualificationRequest) (*RevokeQualificationResult, error)

RevokeQualification is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_RevokeQualificationOperation.html.

func (*MechTurk) SearchHITs Uses

func (mt *MechTurk) SearchHITs(request *SearchHITsRequest) (*SearchHITsResult, error)

SearchHITs is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_SearchHITsOperation.html.

func (*MechTurk) SearchQualificationTypes Uses

func (mt *MechTurk) SearchQualificationTypes(request *SearchQualificationTypesRequest) (*SearchQualificationTypesResult, error)

SearchQualificationTypes is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_SearchQualificationTypesOperation.html.

func (*MechTurk) SendTestEventNotification Uses

func (mt *MechTurk) SendTestEventNotification(request *SendTestEventNotificationRequest) (*SendTestEventNotificationResult, error)

SendTestEventNotification is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_SendTestEventNotificationOperation.html.

func (*MechTurk) SetHITAsReviewing Uses

func (mt *MechTurk) SetHITAsReviewing(request *SetHITAsReviewingRequest) (*SetHITAsReviewingResult, error)

SetHITAsReviewing is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_SetHITAsReviewingOperation.html.

func (*MechTurk) SetHITTypeNotification Uses

func (mt *MechTurk) SetHITTypeNotification(request *SetHITTypeNotificationRequest) (*SetHITTypeNotificationResult, error)

SetHITTypeNotification is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_SetHITTypeNotificationOperation.html.

func (*MechTurk) UnblockWorker Uses

func (mt *MechTurk) UnblockWorker(request *UnblockWorkerRequest) (*UnblockWorkerResult, error)

UnblockWorker is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_UnblockWorkerOperation.html.

func (*MechTurk) UpdateQualificationScore Uses

func (mt *MechTurk) UpdateQualificationScore(request *UpdateQualificationScoreRequest) (*UpdateQualificationScoreResult, error)

UpdateQualificationScore is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_UpdateQualificationScoreOperation.html.

func (*MechTurk) UpdateQualificationType Uses

func (mt *MechTurk) UpdateQualificationType(request *UpdateQualificationTypeRequest) (*QualificationType, error)

UpdateQualificationType is documented at http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_UpdateQualificationTypeOperation.html.

type NotificationSpecification Uses

type NotificationSpecification struct {
    Destination string                 `xml:"Destination,omitempty"`
    Transport   *NotificationTransport `xml:"Transport,omitempty"`
    Version     string                 `xml:"Version,omitempty"`
    EventType   []*EventType           `xml:"EventType,omitempty"`
}

type NotificationTransport Uses

type NotificationTransport string
const (
    NotificationTransportSOAP  NotificationTransport = "SOAP"
    NotificationTransportREST  NotificationTransport = "REST"
    NotificationTransportEmail NotificationTransport = "Email"
    NotificationTransportSQS   NotificationTransport = "SQS"
)

type NotifyWorkersFailureCode Uses

type NotifyWorkersFailureCode string
const (
    NotifyWorkersFailureCodeSoftFailure NotifyWorkersFailureCode = "SoftFailure"
    NotifyWorkersFailureCodeHardFailure NotifyWorkersFailureCode = "HardFailure"
)

type NotifyWorkersFailureStatus Uses

type NotifyWorkersFailureStatus struct {
    NotifyWorkersFailureCode    *NotifyWorkersFailureCode `xml:"NotifyWorkersFailureCode,omitempty"`
    NotifyWorkersFailureMessage string                    `xml:"NotifyWorkersFailureMessage,omitempty"`
    WorkerId                    string                    `xml:"WorkerId,omitempty"`
}

type NotifyWorkersRequest Uses

type NotifyWorkersRequest struct {
    Subject       string   `xml:"Subject,omitempty"`
    MessageText   string   `xml:"MessageText,omitempty"`
    WorkerId      string   `xml:"WorkerId,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type NotifyWorkersResult Uses

type NotifyWorkersResult struct {
    Request                    *Request                    `xml:"Request,omitempty"`
    NotifyWorkersFailureStatus *NotifyWorkersFailureStatus `xml:"NotifyWorkersFailureStatus,omitempty"`
}

type OperationInformation Uses

type OperationInformation struct {
    Name               string `xml:"Name,omitempty"`
    Description        string `xml:"Description,omitempty"`
    RequiredParameters struct {
        Parameter []string `xml:"Parameter,omitempty"`
    }   `xml:"RequiredParameters,omitempty"`
    AvailableParameters struct {
        Parameter []string `xml:"Parameter,omitempty"`
    }   `xml:"AvailableParameters,omitempty"`
    DefaultResponseGroups struct {
        ResponseGroup []string `xml:"ResponseGroup,omitempty"`
    }   `xml:"DefaultResponseGroups,omitempty"`
    AvailableResponseGroups struct {
        ResponseGroup []string `xml:"ResponseGroup,omitempty"`
    }   `xml:"AvailableResponseGroups,omitempty"`
}

type OperationRequest Uses

type OperationRequest struct {
    HTTPHeaders *HTTPHeaders `xml:"HTTPHeaders,omitempty"`
    RequestId   string       `xml:"RequestId,omitempty"`
    Arguments   *Arguments   `xml:"Arguments,omitempty"`
    Errors      *Errors      `xml:"Errors,omitempty"`
}

type ParameterMapEntry Uses

type ParameterMapEntry struct {
    Key   string   `xml:"Key,omitempty"`
    Value []string `xml:"Value,omitempty"`
}

type PolicyParameter Uses

type PolicyParameter struct {
    Key      string               `xml:"Key,omitempty"`
    Value    []string             `xml:"Value,omitempty"`
    MapEntry []*ParameterMapEntry `xml:"MapEntry,omitempty"`
}

type Price Uses

type Price struct {
    Amount         float64 `xml:"Amount,omitempty"`
    CurrencyCode   string  `xml:"CurrencyCode,omitempty"`
    FormattedPrice string  `xml:"FormattedPrice,omitempty"`
}

type Qualification Uses

type Qualification struct {
    Request             *Request             `xml:"Request,omitempty"`
    QualificationTypeId string               `xml:"QualificationTypeId,omitempty"`
    SubjectId           string               `xml:"SubjectId,omitempty"`
    GrantTime           time.Time            `xml:"GrantTime,omitempty"`
    IntegerValue        int32                `xml:"IntegerValue,omitempty"`
    LocaleValue         *Locale              `xml:"LocaleValue,omitempty"`
    Status              *QualificationStatus `xml:"Status,omitempty"`
}

type QualificationRequest Uses

type QualificationRequest struct {
    QualificationRequestId string    `xml:"QualificationRequestId,omitempty"`
    QualificationTypeId    string    `xml:"QualificationTypeId,omitempty"`
    SubjectId              string    `xml:"SubjectId,omitempty"`
    Test                   string    `xml:"Test,omitempty"`
    Answer                 string    `xml:"Answer,omitempty"`
    SubmitTime             time.Time `xml:"SubmitTime,omitempty"`
}

type QualificationRequirement Uses

type QualificationRequirement struct {
    QualificationTypeId string      `xml:"QualificationTypeId,omitempty"`
    Comparator          *Comparator `xml:"Comparator,omitempty"`
    IntegerValue        int32       `xml:"IntegerValue,omitempty"`
    LocaleValue         *Locale     `xml:"LocaleValue,omitempty"`
    RequiredToPreview   bool        `xml:"RequiredToPreview,omitempty"`
}

type QualificationStatus Uses

type QualificationStatus string
const (
    QualificationStatusGranted QualificationStatus = "Granted"
    QualificationStatusRevoked QualificationStatus = "Revoked"
)

type QualificationType Uses

type QualificationType struct {
    Request                 *Request                 `xml:"Request,omitempty"`
    QualificationTypeId     string                   `xml:"QualificationTypeId,omitempty"`
    CreationTime            time.Time                `xml:"CreationTime,omitempty"`
    Name                    string                   `xml:"Name,omitempty"`
    Description             string                   `xml:"Description,omitempty"`
    Keywords                string                   `xml:"Keywords,omitempty"`
    QualificationTypeStatus *QualificationTypeStatus `xml:"QualificationTypeStatus,omitempty"`
    Test                    string                   `xml:"Test,omitempty"`
    TestDurationInSeconds   int                      `xml:"TestDurationInSeconds,omitempty"`
    AnswerKey               string                   `xml:"AnswerKey,omitempty"`
    RetryDelayInSeconds     int                      `xml:"RetryDelayInSeconds,omitempty"`
    IsRequestable           bool                     `xml:"IsRequestable,omitempty"`
    AutoGranted             bool                     `xml:"AutoGranted,omitempty"`
    AutoGrantedValue        int32                    `xml:"AutoGrantedValue,omitempty"`
}

type QualificationTypeStatus Uses

type QualificationTypeStatus string
const (
    QualificationTypeStatusActive   QualificationTypeStatus = "Active"
    QualificationTypeStatusInactive QualificationTypeStatus = "Inactive"
)

type RegisterHITTypeRequest Uses

type RegisterHITTypeRequest struct {
    AutoApprovalDelayInSeconds  int                         `xml:"AutoApprovalDelayInSeconds,omitempty"`
    AssignmentDurationInSeconds int                         `xml:"AssignmentDurationInSeconds,omitempty"`
    Reward                      *Price                      `xml:"Reward,omitempty"`
    Title                       string                      `xml:"Title,omitempty"`
    Keywords                    string                      `xml:"Keywords,omitempty"`
    Description                 string                      `xml:"Description,omitempty"`
    QualificationRequirement    []*QualificationRequirement `xml:"QualificationRequirement,omitempty"`
    ResponseGroup               []string                    `xml:"ResponseGroup,omitempty"`
}

type RegisterHITTypeResult Uses

type RegisterHITTypeResult struct {
    Request   *Request `xml:"Request,omitempty"`
    HITTypeId string   `xml:"HITTypeId,omitempty"`
}

type RejectAssignmentRequest Uses

type RejectAssignmentRequest struct {
    AssignmentId      string   `xml:"AssignmentId,omitempty"`
    ResponseGroup     []string `xml:"ResponseGroup,omitempty"`
    RequesterFeedback string   `xml:"RequesterFeedback,omitempty"`
}

type RejectAssignmentResult Uses

type RejectAssignmentResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type RejectQualificationRequestRequest Uses

type RejectQualificationRequestRequest struct {
    QualificationRequestId string   `xml:"QualificationRequestId,omitempty"`
    Reason                 string   `xml:"Reason,omitempty"`
    ResponseGroup          []string `xml:"ResponseGroup,omitempty"`
}

type RejectQualificationRequestResult Uses

type RejectQualificationRequestResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type Request Uses

type Request struct {
    IsValid                                      string                                        `xml:"IsValid,omitempty"`
    CreateHITRequest                             *CreateHITRequest                             `xml:"CreateHITRequest,omitempty"`
    RegisterHITTypeRequest                       *RegisterHITTypeRequest                       `xml:"RegisterHITTypeRequest,omitempty"`
    DisposeHITRequest                            *DisposeHITRequest                            `xml:"DisposeHITRequest,omitempty"`
    DisableHITRequest                            *DisableHITRequest                            `xml:"DisableHITRequest,omitempty"`
    GetHITRequest                                *GetHITRequest                                `xml:"GetHITRequest,omitempty"`
    GetAssignmentRequest                         *GetAssignmentRequest                         `xml:"GetAssignmentRequest,omitempty"`
    GetReviewResultsForHITRequest                *GetReviewResultsForHITRequest                `xml:"GetReviewResultsForHITRequest,omitempty"`
    GetReviewableHITsRequest                     *GetReviewableHITsRequest                     `xml:"GetReviewableHITsRequest,omitempty"`
    GetHITsForQualificationTypeRequest           *GetHITsForQualificationTypeRequest           `xml:"GetHITsForQualificationTypeRequest,omitempty"`
    GetQualificationsForQualificationTypeRequest *GetQualificationsForQualificationTypeRequest `xml:"GetQualificationsForQualificationTypeRequest,omitempty"`
    SetHITAsReviewingRequest                     *SetHITAsReviewingRequest                     `xml:"SetHITAsReviewingRequest,omitempty"`
    SearchHITsRequest                            *SearchHITsRequest                            `xml:"SearchHITsRequest,omitempty"`
    ExtendHITRequest                             *ExtendHITRequest                             `xml:"ExtendHITRequest,omitempty"`
    ForceExpireHITRequest                        *ForceExpireHITRequest                        `xml:"ForceExpireHITRequest,omitempty"`
    ChangeHITTypeOfHITRequest                    *ChangeHITTypeOfHITRequest                    `xml:"ChangeHITTypeOfHITRequest,omitempty"`
    CreateQualificationTypeRequest               *CreateQualificationTypeRequest               `xml:"CreateQualificationTypeRequest,omitempty"`
    DisposeQualificationTypeRequest              *DisposeQualificationTypeRequest              `xml:"DisposeQualificationTypeRequest,omitempty"`
    GrantQualificationRequest                    *GrantQualificationRequest                    `xml:"GrantQualificationRequest,omitempty"`
    AssignQualificationRequest                   *AssignQualificationRequest                   `xml:"AssignQualificationRequest,omitempty"`
    RevokeQualificationRequest                   *RevokeQualificationRequest                   `xml:"RevokeQualificationRequest,omitempty"`
    GetQualificationRequestsRequest              *GetQualificationRequestsRequest              `xml:"GetQualificationRequestsRequest,omitempty"`
    RejectQualificationRequestRequest            *RejectQualificationRequestRequest            `xml:"RejectQualificationRequestRequest,omitempty"`
    GetQualificationTypeRequest                  *GetQualificationTypeRequest                  `xml:"GetQualificationTypeRequest,omitempty"`
    SearchQualificationTypesRequest              *SearchQualificationTypesRequest              `xml:"SearchQualificationTypesRequest,omitempty"`
    UpdateQualificationTypeRequest               *UpdateQualificationTypeRequest               `xml:"UpdateQualificationTypeRequest,omitempty"`
    ApproveAssignmentRequest                     *ApproveAssignmentRequest                     `xml:"ApproveAssignmentRequest,omitempty"`
    RejectAssignmentRequest                      *RejectAssignmentRequest                      `xml:"RejectAssignmentRequest,omitempty"`
    ApproveRejectedAssignmentRequest             *ApproveRejectedAssignmentRequest             `xml:"ApproveRejectedAssignmentRequest,omitempty"`
    GetAssignmentsForHIT                         *GetAssignmentsForHITRequest                  `xml:"GetAssignmentsForHIT,omitempty"`
    GetFileUploadURL                             *GetFileUploadURLRequest                      `xml:"GetFileUploadURL,omitempty"`
    GrantBonusRequest                            *GrantBonusRequest                            `xml:"GrantBonusRequest,omitempty"`
    GetBonusPaymentsRequest                      *GetBonusPaymentsRequest                      `xml:"GetBonusPaymentsRequest,omitempty"`
    GetAccountBalanceRequest                     *GetAccountBalanceRequest                     `xml:"GetAccountBalanceRequest,omitempty"`
    NotifyWorkersRequest                         *NotifyWorkersRequest                         `xml:"NotifyWorkersRequest,omitempty"`
    GetBlockedWorkersRequest                     *GetBlockedWorkersRequest                     `xml:"GetBlockedWorkersRequest,omitempty"`
    BlockWorkerRequest                           *BlockWorkerRequest                           `xml:"BlockWorkerRequest,omitempty"`
    UnblockWorkerRequest                         *UnblockWorkerRequest                         `xml:"UnblockWorkerRequest,omitempty"`
    GetRequesterStatistic                        *GetRequesterStatisticRequest                 `xml:"GetRequesterStatistic,omitempty"`
    GetRequesterWorkerStatistic                  *GetRequesterWorkerStatisticRequest           `xml:"GetRequesterWorkerStatistic,omitempty"`
    HelpRequest                                  *HelpRequest                                  `xml:"HelpRequest,omitempty"`
    Errors                                       *Errors                                       `xml:"Errors,omitempty"`
}

type RequesterStatistic Uses

type RequesterStatistic string
const (
    RequesterStatisticNumberHITsAssignable            RequesterStatistic = "NumberHITsAssignable"
    RequesterStatisticNumberHITsReviewable            RequesterStatistic = "NumberHITsReviewable"
    RequesterStatisticNumberHITsCreated               RequesterStatistic = "NumberHITsCreated"
    RequesterStatisticNumberHITsCompleted             RequesterStatistic = "NumberHITsCompleted"
    RequesterStatisticTotalRewardPayout               RequesterStatistic = "TotalRewardPayout"
    RequesterStatisticTotalRewardFeePayout            RequesterStatistic = "TotalRewardFeePayout"
    RequesterStatisticTotalFeePayout                  RequesterStatistic = "TotalFeePayout"
    RequesterStatisticTotalRewardAndFeePayout         RequesterStatistic = "TotalRewardAndFeePayout"
    RequesterStatisticTotalBonusPayout                RequesterStatistic = "TotalBonusPayout"
    RequesterStatisticTotalBonusFeePayout             RequesterStatistic = "TotalBonusFeePayout"
    RequesterStatisticEstimatedFeeLiability           RequesterStatistic = "EstimatedFeeLiability"
    RequesterStatisticEstimatedRewardLiability        RequesterStatistic = "EstimatedRewardLiability"
    RequesterStatisticEstimatedTotalLiability         RequesterStatistic = "EstimatedTotalLiability"
    RequesterStatisticNumberAssignmentsAvailable      RequesterStatistic = "NumberAssignmentsAvailable"
    RequesterStatisticNumberAssignmentsAccepted       RequesterStatistic = "NumberAssignmentsAccepted"
    RequesterStatisticNumberAssignmentsPending        RequesterStatistic = "NumberAssignmentsPending"
    RequesterStatisticNumberAssignmentsApproved       RequesterStatistic = "NumberAssignmentsApproved"
    RequesterStatisticNumberAssignmentsRejected       RequesterStatistic = "NumberAssignmentsRejected"
    RequesterStatisticNumberAssignmentsReturned       RequesterStatistic = "NumberAssignmentsReturned"
    RequesterStatisticNumberAssignmentsAbandoned      RequesterStatistic = "NumberAssignmentsAbandoned"
    RequesterStatisticAverageRewardAmount             RequesterStatistic = "AverageRewardAmount"
    RequesterStatisticPercentAssignmentsApproved      RequesterStatistic = "PercentAssignmentsApproved"
    RequesterStatisticPercentAssignmentsRejected      RequesterStatistic = "PercentAssignmentsRejected"
    RequesterStatisticNumberKnownAnswersCorrect       RequesterStatistic = "NumberKnownAnswersCorrect"
    RequesterStatisticNumberKnownAnswersIncorrect     RequesterStatistic = "NumberKnownAnswersIncorrect"
    RequesterStatisticNumberKnownAnswersEvaluated     RequesterStatistic = "NumberKnownAnswersEvaluated"
    RequesterStatisticPercentKnownAnswersCorrect      RequesterStatistic = "PercentKnownAnswersCorrect"
    RequesterStatisticNumberPluralityAnswersCorrect   RequesterStatistic = "NumberPluralityAnswersCorrect"
    RequesterStatisticNumberPluralityAnswersIncorrect RequesterStatistic = "NumberPluralityAnswersIncorrect"
    RequesterStatisticNumberPluralityAnswersEvaluated RequesterStatistic = "NumberPluralityAnswersEvaluated"
    RequesterStatisticPercentPluralityAnswersCorrect  RequesterStatistic = "PercentPluralityAnswersCorrect"
)

type ResponseGroupInformation Uses

type ResponseGroupInformation struct {
    Name            string `xml:"Name,omitempty"`
    CreationDate    string `xml:"CreationDate,omitempty"`
    ValidOperations struct {
        Operation []string `xml:"Operation,omitempty"`
    }   `xml:"ValidOperations,omitempty"`
    Elements struct {
        Element []string `xml:"Element,omitempty"`
    }   `xml:"Elements,omitempty"`
}

type ReviewActionDetail Uses

type ReviewActionDetail struct {
    ActionId     string              `xml:"ActionId,omitempty"`
    ActionName   string              `xml:"ActionName,omitempty"`
    ObjectId     string              `xml:"ObjectId,omitempty"`
    ObjectType   string              `xml:"ObjectType,omitempty"`
    Status       *ReviewActionStatus `xml:"Status,omitempty"`
    CompleteTime time.Time           `xml:"CompleteTime,omitempty"`
    Result       string              `xml:"Result,omitempty"`
    ErrorCode    string              `xml:"ErrorCode,omitempty"`
}

type ReviewActionStatus Uses

type ReviewActionStatus string
const (
    ReviewActionStatusIntended  ReviewActionStatus = "Intended"
    ReviewActionStatusSucceeded ReviewActionStatus = "Succeeded"
    ReviewActionStatusFailed    ReviewActionStatus = "Failed"
    ReviewActionStatusCancelled ReviewActionStatus = "Cancelled"
)

type ReviewPolicy Uses

type ReviewPolicy struct {
    PolicyName string             `xml:"PolicyName,omitempty"`
    Parameter  []*PolicyParameter `xml:"Parameter,omitempty"`
}

type ReviewPolicyLevel Uses

type ReviewPolicyLevel string
const (
    ReviewPolicyLevelAssignment ReviewPolicyLevel = "Assignment"
    ReviewPolicyLevelHIT        ReviewPolicyLevel = "HIT"
)

type ReviewReport Uses

type ReviewReport struct {
    PageNumber      int                   `xml:"PageNumber,omitempty"`
    NumResults      int                   `xml:"NumResults,omitempty"`
    TotalNumResults int                   `xml:"TotalNumResults,omitempty"`
    ReviewResult    []*ReviewResultDetail `xml:"ReviewResult,omitempty"`
    ReviewAction    []*ReviewActionDetail `xml:"ReviewAction,omitempty"`
}

type ReviewResultDetail Uses

type ReviewResultDetail struct {
    ActionId    string `xml:"ActionId,omitempty"`
    SubjectId   string `xml:"SubjectId,omitempty"`
    SubjectType string `xml:"SubjectType,omitempty"`
    QuestionId  string `xml:"QuestionId,omitempty"`
    Key         string `xml:"Key,omitempty"`
    Value       string `xml:"Value,omitempty"`
}

type ReviewableHITStatus Uses

type ReviewableHITStatus string
const (
    ReviewableHITStatusReviewable ReviewableHITStatus = "Reviewable"
    ReviewableHITStatusReviewing  ReviewableHITStatus = "Reviewing"
)

type RevokeQualificationRequest Uses

type RevokeQualificationRequest struct {
    SubjectId           string   `xml:"SubjectId,omitempty"`
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    Reason              string   `xml:"Reason,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type RevokeQualificationResult Uses

type RevokeQualificationResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type SearchHITsRequest Uses

type SearchHITsRequest struct {
    SortDirection *SortDirection          `xml:"SortDirection,omitempty"`
    SortProperty  *SearchHITsSortProperty `xml:"SortProperty,omitempty"`
    PageNumber    int                     `xml:"PageNumber,omitempty"`
    PageSize      int                     `xml:"PageSize,omitempty"`
    ResponseGroup []string                `xml:"ResponseGroup,omitempty"`
}

type SearchHITsResult Uses

type SearchHITsResult struct {
    Request         *Request `xml:"Request,omitempty"`
    PageNumber      int      `xml:"PageNumber,omitempty"`
    NumResults      int      `xml:"NumResults,omitempty"`
    TotalNumResults int      `xml:"TotalNumResults,omitempty"`
    HIT             []*HIT   `xml:"HIT,omitempty"`
}

type SearchHITsSortProperty Uses

type SearchHITsSortProperty string
const (
    SearchHITsSortPropertyTitle        SearchHITsSortProperty = "Title"
    SearchHITsSortPropertyReward       SearchHITsSortProperty = "Reward"
    SearchHITsSortPropertyExpiration   SearchHITsSortProperty = "Expiration"
    SearchHITsSortPropertyCreationTime SearchHITsSortProperty = "CreationTime"
    SearchHITsSortPropertyEnumeration  SearchHITsSortProperty = "Enumeration"
)

type SearchQualificationTypesRequest Uses

type SearchQualificationTypesRequest struct {
    Query               string                                `xml:"Query,omitempty"`
    MustBeRequestable   bool                                  `xml:"MustBeRequestable,omitempty"`
    MustBeOwnedByCaller bool                                  `xml:"MustBeOwnedByCaller,omitempty"`
    SortDirection       *SortDirection                        `xml:"SortDirection,omitempty"`
    SortProperty        *SearchQualificationTypesSortProperty `xml:"SortProperty,omitempty"`
    PageNumber          int                                   `xml:"PageNumber,omitempty"`
    PageSize            int                                   `xml:"PageSize,omitempty"`
    ResponseGroup       []string                              `xml:"ResponseGroup,omitempty"`
}

type SearchQualificationTypesResult Uses

type SearchQualificationTypesResult struct {
    Request           *Request             `xml:"Request,omitempty"`
    NumResults        int                  `xml:"NumResults,omitempty"`
    TotalNumResults   int                  `xml:"TotalNumResults,omitempty"`
    PageNumber        int                  `xml:"PageNumber,omitempty"`
    QualificationType []*QualificationType `xml:"QualificationType,omitempty"`
}

type SearchQualificationTypesSortProperty Uses

type SearchQualificationTypesSortProperty string
const (
    SearchQualificationTypesSortPropertyName SearchQualificationTypesSortProperty = "Name"
)

type SendTestEventNotificationRequest Uses

type SendTestEventNotificationRequest struct {
    Notification  *NotificationSpecification `xml:"Notification,omitempty"`
    TestEventType *EventType                 `xml:"TestEventType,omitempty"`
}

type SendTestEventNotificationResult Uses

type SendTestEventNotificationResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type SetHITAsReviewingRequest Uses

type SetHITAsReviewingRequest struct {
    HITId         string   `xml:"HITId,omitempty"`
    Revert        bool     `xml:"Revert,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type SetHITAsReviewingResult Uses

type SetHITAsReviewingResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type SetHITTypeNotificationRequest Uses

type SetHITTypeNotificationRequest struct {
    HITTypeId    string                     `xml:"HITTypeId,omitempty"`
    Notification *NotificationSpecification `xml:"Notification,omitempty"`
    Active       bool                       `xml:"Active,omitempty"`
}

type SetHITTypeNotificationResult Uses

type SetHITTypeNotificationResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type SortDirection Uses

type SortDirection string
const (
    SortDirectionAscending  SortDirection = "Ascending"
    SortDirectionDescending SortDirection = "Descending"
)

Sort directions

type TimePeriod Uses

type TimePeriod string
const (
    TimePeriodOneDay     TimePeriod = "OneDay"
    TimePeriodSevenDays  TimePeriod = "SevenDays"
    TimePeriodThirtyDays TimePeriod = "ThirtyDays"
    TimePeriodLifeToDate TimePeriod = "LifeToDate"
)

type UnblockWorkerRequest Uses

type UnblockWorkerRequest struct {
    WorkerId      string   `xml:"WorkerId,omitempty"`
    Reason        string   `xml:"Reason,omitempty"`
    ResponseGroup []string `xml:"ResponseGroup,omitempty"`
}

type UnblockWorkerResult Uses

type UnblockWorkerResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type UpdateQualificationScoreRequest Uses

type UpdateQualificationScoreRequest struct {
    QualificationTypeId string   `xml:"QualificationTypeId,omitempty"`
    SubjectId           string   `xml:"SubjectId,omitempty"`
    IntegerValue        int32    `xml:"IntegerValue,omitempty"`
    ResponseGroup       []string `xml:"ResponseGroup,omitempty"`
}

type UpdateQualificationScoreResult Uses

type UpdateQualificationScoreResult struct {
    Request *Request `xml:"Request,omitempty"`
}

type UpdateQualificationTypeRequest Uses

type UpdateQualificationTypeRequest struct {
    QualificationTypeId     string                   `xml:"QualificationTypeId,omitempty"`
    Description             string                   `xml:"Description,omitempty"`
    QualificationTypeStatus *QualificationTypeStatus `xml:"QualificationTypeStatus,omitempty"`
    Test                    string                   `xml:"Test,omitempty"`
    AnswerKey               string                   `xml:"AnswerKey,omitempty"`
    TestDurationInSeconds   int                      `xml:"TestDurationInSeconds,omitempty"`
    RetryDelayInSeconds     int                      `xml:"RetryDelayInSeconds,omitempty"`
    AutoGranted             bool                     `xml:"AutoGranted,omitempty"`
    AutoGrantedValue        int32                    `xml:"AutoGrantedValue,omitempty"`
    ResponseGroup           []string                 `xml:"ResponseGroup,omitempty"`
}

type WorkerBlock Uses

type WorkerBlock struct {
    WorkerId string `xml:"WorkerId,omitempty"`
    Reason   string `xml:"Reason,omitempty"`
}

Directories

PathSynopsis
credentialsPackage credentials provides credential retrieval and management.
signerPackage signer provides a signer type that signs Mechanical Turk requests.
soapPackage soap provides SOAP support.

Package mechturk imports 11 packages (graph). Updated 2017-04-11. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).