Class: Clickmeetings::Open::FileLibrary
- Defined in:
- lib/clickmeetings/models/open/file_library.rb
Instance Attribute Summary collapse
-
#conversion_progress ⇒ Object
Returns the value of attribute conversion_progress.
-
#document_type ⇒ Object
Returns the value of attribute document_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_message ⇒ Object
Returns the value of attribute status_message.
-
#upload_date ⇒ Object
Returns the value of attribute upload_date.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Model
Class Method Summary collapse
Instance Method Summary collapse
-
#download ⇒ Object
returns content of file; use File#write to save it.
Methods inherited from Model
api_key, client_options, #default_headers, ping, with_account
Methods inherited from Model
#action_path, all, #client, client_options, #default_headers, #default_params, #destroy, find, #handle_response, #remote_path, #remote_url, set_resource_name, #update
Instance Attribute Details
#conversion_progress ⇒ Object
Returns the value of attribute conversion_progress.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def conversion_progress @conversion_progress end |
#document_type ⇒ Object
Returns the value of attribute document_type.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def document_type @document_type end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def status @status end |
#status_message ⇒ Object
Returns the value of attribute status_message.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def end |
#upload_date ⇒ Object
Returns the value of attribute upload_date.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def upload_date @upload_date end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 6 def url @url end |
Class Method Details
.create(path: '', conference_id: nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 10 def create(path: '', conference_id: nil) params = { uploaded: Faraday::UploadIO.new(path, '') } if conference_id.present? response = Clickmeetings.with_client() do Clickmeetings.client.post remote_url("conferences/#{conference_id}"), params.merge(default_params), default_headers end handle_response response else super(params) end end |
.for_conference(conference_id: nil) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 23 def for_conference(conference_id: nil) response = Clickmeetings.with_client() do Clickmeetings.client.get remote_url("conferences/#{conference_id}"), default_params, default_headers end handle_response response end |
Instance Method Details
#download ⇒ Object
returns content of file; use File#write to save it
33 34 35 36 37 38 39 40 |
# File 'lib/clickmeetings/models/open/file_library.rb', line 33 def download response = Clickmeetings.with_client() do Clickmeetings.client.connect.get remote_url(__method__, id: id) do |req| req.headers.merge! default_headers end end response.body end |