Sha256: 9e7ff16c8079f558b75ef012dbd7fe840020729e25f89f9254c1b7cd6f564761

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

module CrowdFlower
  class Judgment
    include Defaults
    attr_reader :job
    
    def initialize(job)
      @job = job
      Judgment.connect
    end
    
    def resource_uri
      "/jobs/#{@job.id}/judgments"
    end
    
    #Pull every judgment
    def all(page = 1, limit = 100, latest = true)#full = true
      opts = @@version == 2 ? {:unseen => latest} : {:latest => latest}
      Judgment.get(resource_uri, {:query => {:limit => limit, :page => page}.merge(opts)})
    end
    
    def get(id)
      Judgment.get("/#{id}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crowdflower-0.4.5 lib/crowdflower/judgment.rb