class Datahen::CLI::ScraperExporter

Public Class Methods

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

Public Instance Methods

list(scraper_name) click to toggle source
# File lib/datahen/cli/scraper_exporter.rb, line 33
def list(scraper_name)
  client = Client::ScraperExporter.new(options)
  puts "#{client.all(scraper_name)}"
end
show(scraper_name, exporter_name) click to toggle source
# File lib/datahen/cli/scraper_exporter.rb, line 10
def show(scraper_name, exporter_name)
  client = Client::ScraperExporter.new(options)
  puts "#{client.find(scraper_name, exporter_name)}"
end
start(scraper_name, exporter_name) click to toggle source
# File lib/datahen/cli/scraper_exporter.rb, line 17
def start(scraper_name, exporter_name)
  if options[:job]
    client = Client::JobExport.new(options)
    puts "#{client.create(options[:job], exporter_name)}"
  else
    client = Client::ScraperExport.new(options)
    puts "#{client.create(scraper_name, exporter_name)}"
  end
end