Sha256: 295a8e0571b53c49ab3c1192e41ebf80c430da1cd04bfc5274ef64b56b0aa45b

Contents?: true

Size: 763 Bytes

Versions: 9

Compression:

Stored size: 763 Bytes

Contents

# encoding: UTF-8

require 'pp'

require_relative '../shared'
require_relative '../../commands/api'

GoodData::CLI.module_eval do
  desc 'Some basic API stuff directly from CLI'
  arg_name 'info|test|get|delete'
  command :api do |c|
    c.desc 'Info about the API version etc'
    c.command :info do |info|
      info.action do |global_options, options, _args|
        opts = options.merge(global_options)
        GoodData.connect(opts)
        pp GoodData::Command::Api.info
      end
    end

    c.desc 'GET request on our API'
    c.command :get do |get|
      get.action do |global_options, options, args|
        opts = options.merge(global_options)
        GoodData.connect(opts)
        pp GoodData::Command::Api.get(args[0])
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gooddata-0.6.20 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.19 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.18 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.17 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.16 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.15 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.14 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.13 lib/gooddata/cli/commands/api_cmd.rb
gooddata-0.6.12 lib/gooddata/cli/commands/api_cmd.rb