Sha256: 9c9cc3204d0c696386b3ef068cdbc8cbea4de534dac364fb0a067f26143ed25d

Contents?: true

Size: 956 Bytes

Versions: 19

Compression:

Stored size: 956 Bytes

Contents

module GoodData::Command
  class Api < Base
    def info
      json = gooddata.release_info
      puts "GoodData API"
      puts "  Version: #{json['releaseName']}"
      puts "  Released: #{json['releaseDate']}"
      puts "  For more info see #{json['releaseNotesUri']}"
    end
    alias :index :info

    def test
      connect
      if GoodData.test_login
        puts "Succesfully logged in as #{GoodData.profile.user}"
      else
        puts "Unable to log in to GoodData server!"
      end
    end

    def get
      path = args.shift rescue nil
      raise(CommandFailed, "Specify the path you want to GET.") if path.nil?
      connect
      result = GoodData.get path
      jj result rescue puts result
    end

    def delete
      path = args.shift rescue nil
      raise(CommandFailed, "Specify the path you want to DELETE.") if path.nil?
      connect
      result = GoodData.delete path
      jj result rescue puts result
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gooddata-0.5.16 lib/gooddata/commands/api.rb
gooddata-0.5.15 lib/gooddata/commands/api.rb
gooddata-0.5.14 lib/gooddata/commands/api.rb
gooddata-0.5.13 lib/gooddata/commands/api.rb
gooddata-0.5.12 lib/gooddata/commands/api.rb
gooddata-0.5.11 lib/gooddata/commands/api.rb
gooddata-0.5.10 lib/gooddata/commands/api.rb
gooddata-0.5.9 lib/gooddata/commands/api.rb
gooddata-0.5.8 lib/gooddata/commands/api.rb
gooddata-0.5.7 lib/gooddata/commands/api.rb
gooddata-0.5.6 lib/gooddata/commands/api.rb
gooddata-0.5.5 lib/gooddata/commands/api.rb
gooddata-0.5.4 lib/gooddata/commands/api.rb
gooddata-0.5.3 lib/gooddata/commands/api.rb
gooddata-0.5.2 lib/gooddata/commands/api.rb
gooddata-0.5.1 lib/gooddata/commands/api.rb
gooddata-0.5.0 lib/gooddata/commands/api.rb
gooddata-0.4.0 lib/gooddata/commands/api.rb
gooddata-0.2.0 lib/gooddata/commands/api.rb