Sha256: 0c4a07d4f0159fe71226c474a76ba548c270df22d32195b13e56348f50838d17

Contents?: true

Size: 899 Bytes

Versions: 9

Compression:

Stored size: 899 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

9 entries across 9 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre10 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre9 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre8 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre7 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre6 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre5 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre4 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre3 lib/gooddata/commands/api.rb
gooddata-0.6.0.pre2 lib/gooddata/commands/api.rb