Sha256: 8177c897dc07c3809cfef6c498e587bbbfeeb3b965aa1ea88069729778b4f845

Contents?: true

Size: 610 Bytes

Versions: 22

Compression:

Stored size: 610 Bytes

Contents

module RTurk
  class GetHIT < Operation

    require_params :hit_id
    attr_accessor :hit_id, :include_assignment_summary

    def parse(xml)
      RTurk::GetHITResponse.new(xml)
    end

    def to_params
      params = {"HITId" => self.hit_id}

      if @include_assignment_summary
        params["ResponseGroup"] = {
          0 => "HITDetail", # default
          1 => "HITQuestion", # default
          2 => "Minimal", # default
          3 => "HITAssignmentSummary" # added
        }
      end

      params
    end

  end

  def self.GetHIT(*args, &blk)
    RTurk::GetHIT.create(*args, &blk)
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rturk-2.12.1 lib/rturk/operations/get_hit.rb
rturk-2.12.0 lib/rturk/operations/get_hit.rb
rturk-2.11.3 lib/rturk/operations/get_hit.rb
rturk-2.11.2 lib/rturk/operations/get_hit.rb
rturk-2.11.1 lib/rturk/operations/get_hit.rb
rturk-2.11.0 lib/rturk/operations/get_hit.rb
rturk-2.10.3 lib/rturk/operations/get_hit.rb
rturk-2.10.2 lib/rturk/operations/get_hit.rb
rturk-2.10.1 lib/rturk/operations/get_hit.rb
rturk-2.10.0 lib/rturk/operations/get_hit.rb
rturk-2.9.0 lib/rturk/operations/get_hit.rb
rturk-2.8.0 lib/rturk/operations/get_hit.rb
rturk-2.7.0 lib/rturk/operations/get_hit.rb
rturk-2.6.0 lib/rturk/operations/get_hit.rb
rturk-2.5.2 lib/rturk/operations/get_hit.rb
rturk-2.5.0 lib/rturk/operations/get_hit.rb
rturk-2.4.1 lib/rturk/operations/get_hit.rb
rturk-2.4.0 lib/rturk/operations/get_hit.rb
rturk-2.3.6 lib/rturk/operations/get_hit.rb
rturk-2.3.5 lib/rturk/operations/get_hit.rb