class Datahen::CLI::JobOutput

Public Class Methods

banner(command, namespace = nil, subcommand = false) click to toggle source

Public Instance Methods

collections(scraper_name) click to toggle source
# File lib/datahen/cli/job_output.rb, line 55
def collections(scraper_name)

  if options[:job]
    client = Client::JobOutput.new(options)
    puts "#{client.collections(options[:job])}"
  else
    client = Client::ScraperJobOutput.new(options)
    puts "#{client.collections(scraper_name)}"
  end
end
list(scraper_name) click to toggle source
# File lib/datahen/cli/job_output.rb, line 19
def list(scraper_name)
  collection = options.fetch(:collection) { 'default' }
  if options[:job]
    client = Client::JobOutput.new(options)
    puts "#{client.all(options[:job], collection)}"
  else
    client = Client::ScraperJobOutput.new(options)
    puts "#{client.all(scraper_name, collection)}"
  end
end
show(scraper_name, id) click to toggle source
# File lib/datahen/cli/job_output.rb, line 37
def show(scraper_name, id)
  collection = options.fetch(:collection) { 'default' }
  if options[:job]
    client = Client::JobOutput.new(options)
    puts "#{client.find(options[:job], collection, id)}"
  else
    client = Client::ScraperJobOutput.new(options)
    puts "#{client.find(scraper_name, collection, id)}"
  end
end