Class: CDD::Export
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#search ⇒ Object
Returns the value of attribute search.
-
#status ⇒ Object
Returns the value of attribute status.
-
#vault ⇒ Object
Returns the value of attribute vault.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from CDD::Base
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
3 4 5 |
# File 'lib/cdd/export.rb', line 3 def format @format end |
#search ⇒ Object
Returns the value of attribute search.
5 6 7 |
# File 'lib/cdd/export.rb', line 5 def search @search end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/cdd/export.rb', line 4 def status @status end |
#vault ⇒ Object
Returns the value of attribute vault.
6 7 8 |
# File 'lib/cdd/export.rb', line 6 def vault @vault end |
Instance Method Details
#data ⇒ Object
16 17 18 19 |
# File 'lib/cdd/export.rb', line 16 def data response = RestClient.get "#{client.url}#{data_url}", { :params => {}, "X-CDD-Token" => client.token } response.to_s if response end |
#data_url ⇒ Object
21 22 23 |
# File 'lib/cdd/export.rb', line 21 def data_url "/api/v1/vaults/#{vault.id}/exports/#{id}" end |
#poll ⇒ Object
8 9 10 |
# File 'lib/cdd/export.rb', line 8 def poll client.execute(poll_url) end |
#poll_url ⇒ Object
12 13 14 |
# File 'lib/cdd/export.rb', line 12 def poll_url "/api/v1/vaults/#{vault.id}/export_progress/#{self.id}" end |