Sha256: 8788e33224065d79855e12859ee66a12a994da2a5805b518676c5866e6fc9d07

Contents?: true

Size: 1.17 KB

Versions: 47

Compression:

Stored size: 1.17 KB

Contents

module Datahen
  module Client
    class JobStat < Datahen::Client::Base

      def job_current_stats(job_id, opts={})
        if opts[:live]
          self.class.get("/jobs/#{job_id}/stats/current", @options)
        else
          self.class.get("/cached/jobs/#{job_id}/stats/current", @options)
        end
      end

      def scraper_job_current_stats(scraper_name, opts={})
        if opts[:live]
          self.class.get("/scrapers/#{scraper_name}/current_job/stats/current", @options)
        else
          self.class.get("/cached/scrapers/#{scraper_name}/current_job/stats/current", @options)
        end
      end

      def job_stats_history(job_id, opts={})
        if opts[:live]
          self.class.get("/jobs/#{job_id}/stats/history", @options)
        else
          self.class.get("/cached/jobs/#{job_id}/stats/history", @options)
        end
      end

      def scraper_job_stats_history(scraper_name, opts={})
        if opts[:live]
          self.class.get("/scrapers/#{scraper_name}/current_job/stats/history", @options)
        else
          self.class.get("/cached/scrapers/#{scraper_name}/current_job/stats/history", @options)
        end
      end

    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
datahen-1.6.3 lib/datahen/client/job_stat.rb
datahen-1.6.2 lib/datahen/client/job_stat.rb
datahen-1.6.1 lib/datahen/client/job_stat.rb
datahen-1.6.0 lib/datahen/client/job_stat.rb
datahen-1.5.3 lib/datahen/client/job_stat.rb
datahen-1.5.2 lib/datahen/client/job_stat.rb
datahen-1.5.1 lib/datahen/client/job_stat.rb
datahen-1.4.0 lib/datahen/client/job_stat.rb
datahen-1.3.2 lib/datahen/client/job_stat.rb
datahen-1.3.1 lib/datahen/client/job_stat.rb
datahen-1.3.0 lib/datahen/client/job_stat.rb
datahen-1.2.3 lib/datahen/client/job_stat.rb
datahen-1.2.2 lib/datahen/client/job_stat.rb
datahen-1.2.1 lib/datahen/client/job_stat.rb
datahen-1.1.2 lib/datahen/client/job_stat.rb
datahen-1.1.1 lib/datahen/client/job_stat.rb
datahen-1.0.3 lib/datahen/client/job_stat.rb
datahen-1.0.2 lib/datahen/client/job_stat.rb
datahen-1.0.1 lib/datahen/client/job_stat.rb
datahen-1.0.0 lib/datahen/client/job_stat.rb