Class: Superset::Dashboard::Import
- Defined in:
- lib/superset/dashboard/import.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#overwrite ⇒ Object
readonly
Returns the value of attribute overwrite.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(source:, overwrite: true) ⇒ Import
constructor
A new instance of Import.
- #perform ⇒ Object
- #response ⇒ Object
Methods inherited from Request
call, #query_params, #result, #superset_host
Methods included from Superset::Display
#ids, #list, #list_attributes, #result, #rows, #table, #title, #to_h
Constructor Details
#initialize(source:, overwrite: true) ⇒ Import
Returns a new instance of Import.
28 29 30 31 |
# File 'lib/superset/dashboard/import.rb', line 28 def initialize(source:, overwrite: true) @source = source @overwrite = overwrite end |
Instance Attribute Details
#overwrite ⇒ Object (readonly)
Returns the value of attribute overwrite.
26 27 28 |
# File 'lib/superset/dashboard/import.rb', line 26 def overwrite @overwrite end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
26 27 28 |
# File 'lib/superset/dashboard/import.rb', line 26 def source @source end |
Instance Method Details
#perform ⇒ Object
33 34 35 36 |
# File 'lib/superset/dashboard/import.rb', line 33 def perform validate_params response end |
#response ⇒ Object
38 39 40 41 42 43 |
# File 'lib/superset/dashboard/import.rb', line 38 def response @response ||= client(use_json: false).post( route, payload ) end |