Class: GoodData::Command::Api
Overview
Low level access to GoodData API
Class Method Summary collapse
-
.delete(path) ⇒ Object
Delete resource.
-
.get(path) ⇒ Object
Get resource.
- .info ⇒ Object (also: index)
-
.test ⇒ Object
Test of login.
Class Method Details
.delete(path) ⇒ Object
Delete resource
52 53 54 55 56 57 58 59 60 |
# File 'lib/gooddata/commands/api.rb', line 52 def delete(path) fail(GoodData::CommandFailed, 'Specify the path you want to DELETE.') if path.nil? result = GoodData.delete path begin result rescue puts result end end |
.get(path) ⇒ Object
Get resource
40 41 42 43 44 45 46 47 48 |
# File 'lib/gooddata/commands/api.rb', line 40 def get(path) fail(GoodData::CommandFailed, 'Specify the path you want to GET.') if path.nil? result = GoodData.get path begin result rescue puts result end end |
.info ⇒ Object Also known as: index
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gooddata/commands/api.rb', line 14 def info json = { 'releaseName' => 'N/A', 'releaseDate' => 'N/A', 'releaseNotesUri' => 'N/A' } puts 'GoodData API' puts " Version: #{json['releaseName']}" puts " Released: #{json['releaseDate']}" puts " For more info see #{json['releaseNotesUri']}" end |