Sha256: d9a30601c01a5cdd954f2f4895310b2c5775881e624dc269615433ade3208ca0

Contents?: true

Size: 900 Bytes

Versions: 1

Compression:

Stored size: 900 Bytes

Contents

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

      alias :index :info

      def test
        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)
        raise(CommandFailed, "Specify the path you want to GET.") if path.nil?
        result = GoodData.get path
        result rescue puts result
      end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre11 lib/gooddata/commands/api.rb