View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Mechanical Turk > Net-Amazon-MechanicalTurk > Net::Amazon::MechanicalTurk::Command::RetrieveResults



Annotate this POD


New  3
Open  2
View/Report Bugs
Module Version: 1.00   Source  


Net::Amazon::MechanicalTurk::Command::RetrieveResults - Retrieves answer data.


        input    => "loadhits-success.csv",
        output   => "loadhits-results.csv",
        progress => \*STDOUT

retrieveResults ^


Retrieves the available answers for each HITId in input and stores the answers in output.

   input - The input parameter is something which should produce rows of data
           (hashes) with at least one column named HITId.  The case does not 
           matter, however all rows should use the same column name.  Row 1
           should not have hitid, if row 2 has HITId.  This parameter may be
           of the following types:
              - Net::Amazon::MechanicalTurk::RowData
              - An array of hashes.
                (This is internally converted into an object of type:
              - A reference to a subroutine.  When the retrieveResults
                method asks for row data, the subroutine will be called and
                passed a subroutine reference, which should be called
                for every row generated by the input.  The generated row
                should be a hash reference.
                (This is internally converted into an object of type
              - The name of a file.  The file should be either a CSV or
                tab delimited file.  If the file name ends with '.csv',
                it will read as a CSV, otherwise it is assumed to be
                tab delimited. The first row in the file should contain
                the column names.  Each subsequence row becomes a hash
                reference based on the column names.
                (This is internally converted into an object of type
    output - Used to write answer information back to some form of data
             storage. This parameter may be of the following types:
              - A filename. The answers for an assignment will be 
                written to the file name as a delimited file.  It
                will be a CSV file if the file name ends with .csv,
                otherwise it will be a tab delimited file.
                The file will have the following named columns:
              There will be unnamed columns after those.  These columns will
              come in pairs.  A pair will have a question id and then 
              a textual form of the answer, for that question.
              - A subroutine.  The subroutine will be called back with
                a hash containing the following values:
                    - mturk      - A handle to the mturk client.
                    - HITId      - The HITId for the assignment.
                    - row        - The row from the input.
                    - assignment - An assignment object as returned by
syntax highlighting: