Sha256: e1d83acc857adae6ca6b22c8499765c3122617d784c9b0d19350bd619a3b1a87

Contents?: true

Size: 814 Bytes

Versions: 15

Compression:

Stored size: 814 Bytes

Contents

module AnswersEngine
  class CLI < Thor
    class Job < Thor
      package_name "job"
      def self.banner(command, namespace = nil, subcommand = false)
        "#{basename} #{@package_name} #{command.usage}"
      end


      desc "list", "gets a list of jobs"
      option :page, :aliases => :p, type: :numeric, desc: 'Get the next set of records by page.'
      option :per_page, :aliases => :P, type: :numeric, desc: 'Number of records per page. Max 500 per page.'
      long_desc <<-LONGDESC
        List scrape jobs.
      LONGDESC
      def list()
        client = Client::Job.new(options)
        puts "#{client.all()}"
      end

      desc "show <job_id>", "Show a job"
      def show(job_id)
        client = Client::Job.new(options)
        puts "#{client.find(job_id)}"
      end

    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
answersengine-0.10.1 lib/answersengine/cli/job.rb
answersengine-0.10.0 lib/answersengine/cli/job.rb
answersengine-0.9.1 lib/answersengine/cli/job.rb
answersengine-0.9.0 lib/answersengine/cli/job.rb
answersengine-0.8.0 lib/answersengine/cli/job.rb
answersengine-0.7.0 lib/answersengine/cli/job.rb
answersengine-0.6.0 lib/answersengine/cli/job.rb
answersengine-0.5.0 lib/answersengine/cli/job.rb
answersengine-0.4.1 lib/answersengine/cli/job.rb
answersengine-0.4.0 lib/answersengine/cli/job.rb
answersengine-0.3.3 lib/answersengine/cli/job.rb
answersengine-0.3.2 lib/answersengine/cli/job.rb
answersengine-0.3.1 lib/answersengine/cli/job.rb
answersengine-0.3.0 lib/answersengine/cli/job.rb
answersengine-0.2.33 lib/answersengine/cli/job.rb