gooddata 0.5.13 → 0.5.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,7 +86,21 @@ Sometimes it is useful to compute reports outside of UI so there are couple of c
86
86
  pp result
87
87
 
88
88
  File.open('png.png', 'w') do |f|
89
- f.write(report.export(:png))
89
+ f.write(report.export(:png))
90
+ end
91
+
92
+ You can export even whole dashboards. Currently afaik reports can be exported either as xls and png and dashboards as pdf. Hopefully it will support more in the future.
93
+
94
+ dash = GoodData::Dashboard[33807]
95
+ File.open('dash.pdf', 'w') do |f|
96
+ f.write(dash.export(:pdf))
97
+ end
98
+
99
+ You can specify which tab to export. By default it is the first
100
+
101
+ dash = GoodData::Dashboard[33807]
102
+ File.open('dash.pdf', 'w') do |f|
103
+ f.write(dash.export(:pdf, :tab => dash.tabs_ids.last))
90
104
  end
91
105
 
92
106
  === CLI Usage
@@ -15,7 +15,7 @@ module GoodData
15
15
  supported_formats = [:pdf]
16
16
  fail "Wrong format provied \"#{format}\". Only supports formats #{supported_formats.join(', ')}" unless supported_formats.include?(format)
17
17
  tab = options[:tab] || ""
18
- x = GoodData.post("/gdc/projects/lbhjnmbwa07f9g46hnjp3l5c9hphnev9/clientexport", {"clientExport" => {"url" => "https://secure.gooddata.com/dashboard.html#project=#{GoodData.project.uri}&dashboard=#{uri}&tab=#{tab}&export=1", "name" => title}}, :process => false)
18
+ x = GoodData.post("/gdc/projects/#{GoodData.project.uri}/clientexport", {"clientExport" => {"url" => "https://secure.gooddata.com/dashboard.html#project=#{GoodData.project.uri}&dashboard=#{uri}&tab=#{tab}&export=1", "name" => title}}, :process => false)
19
19
  while (x.code == 202) do
20
20
  sleep(1)
21
21
  uri = JSON.parse(x.body)["asyncTask"]["link"]["poll"]
@@ -1,3 +1,3 @@
1
1
  module GoodData
2
- VERSION = "0.5.13"
2
+ VERSION = "0.5.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: