Sha256: 9c5c987d7e8deec213cd439cd1506aa2c6c4365f8b8a154cb5cf920b376fa088

Contents?: true

Size: 759 Bytes

Versions: 23

Compression:

Stored size: 759 Bytes

Contents

module RTurk
  class GetReviewableHITs < Operation
    attr_accessor :page_size, :page_number, :hit_type_id, :status,
                  :sort_property, :sort_direction

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

    def to_params
      params = {
       'PageSize' => (page_size || 100),
       'PageNumber' => (page_number || 1)
      }
      params['HITTypeId'] = hit_type_id unless hit_type_id.nil?
      params['Status'] = status unless status.nil?
      params['SortProperty'] = sort_property unless sort_property.nil?
      params['SortDirection'] = sort_direction unless sort_direction.nil?
      params
    end
  end

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

Version data entries

23 entries across 23 versions & 1 rubygems

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