Class: Superset::Dashboard::Get
Constant Summary
Constants inherited
from Request
Request::PAGE_SIZE
Instance Attribute Summary collapse
Attributes inherited from Request
#page_num
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Request
#query_params, #response, #result, #superset_host
#display_headers, #list, #list_attributes, #result, #table
Constructor Details
#initialize(id) ⇒ Get
note .. this endpoint also accepts a dashboards uuid as the identifier
8
9
10
|
# File 'lib/superset/dashboard/get.rb', line 8
def initialize(id)
@id = id
end
|
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5
6
7
|
# File 'lib/superset/dashboard/get.rb', line 5
def id
@id
end
|
Class Method Details
.call(id) ⇒ Object
12
13
14
|
# File 'lib/superset/dashboard/get.rb', line 12
def self.call(id)
self.new(id).list
end
|
Instance Method Details
#filter_configuration ⇒ Object
29
30
31
|
# File 'lib/superset/dashboard/get.rb', line 29
def filter_configuration
json_metadata['native_filter_configuration'] || []
end
|
25
26
27
|
# File 'lib/superset/dashboard/get.rb', line 25
def json_metadata
JSON.parse(result['json_metadata'])
end
|
16
17
18
19
|
# File 'lib/superset/dashboard/get.rb', line 16
def perform
response
self
end
|
#positions ⇒ Object
33
34
35
|
# File 'lib/superset/dashboard/get.rb', line 33
def positions
JSON.parse(result['position_json'])
end
|
#title ⇒ Object
21
22
23
|
# File 'lib/superset/dashboard/get.rb', line 21
def title
"#{result['dashboard_title']}"
end
|
#url ⇒ Object
37
38
39
|
# File 'lib/superset/dashboard/get.rb', line 37
def url
"#{superset_host}#{result['url']}"
end
|