Sha256: cb084efc66dfb977576a393428b3af268e2f369e41b8838ab6886a73f7faa7bd
Contents?: true
Size: 575 Bytes
Versions: 2
Compression:
Stored size: 575 Bytes
Contents
module CrowdFlower class Judgment < Base attr_reader :job def initialize(job) super job.connection @job = job connect end def resource_uri "/jobs/#{@job.id}/judgments" end #Pull every judgment def all(page = 1, limit = 100, latest = true) opts = connection.version == 2 ? {:unseen => latest} : {:latest => latest} connection.get(resource_uri, {:query => {:limit => limit, :page => page}.merge(opts)}) end def get(id) connection.get("#{resource_uri}/#{id}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crowdflower-0.12.0 | lib/crowdflower/judgment.rb |
crowdflower-0.11.0 | lib/crowdflower/judgment.rb |