Class: Webex::User::File

Inherits:
Object
  • Object
show all
Includes:
Webex
Defined in:
lib/webex/user/file.rb

Overview

comment

Constant Summary

Constants included from Webex

CONFIGURATION, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Webex

#env_attributes!, #option_required!

Constructor Details

#initialize(attributes = {}) ⇒ File

Returns a new instance of File.



8
9
10
11
12
# File 'lib/webex/user/file.rb', line 8

def initialize(attributes = {})
  attributes.each { |k, v| send("#{k}=", v) }
  env_attributes!
  option_required! :back_url
end

Instance Attribute Details

#back_urlObject

Returns the value of attribute back_url.



6
7
8
# File 'lib/webex/user/file.rb', line 6

def back_url
  @back_url
end

#current_directoryObject

Returns the value of attribute current_directory.



6
7
8
# File 'lib/webex/user/file.rb', line 6

def current_directory
  @current_directory
end

#file_nameObject

Returns the value of attribute file_name.



6
7
8
# File 'lib/webex/user/file.rb', line 6

def file_name
  @file_name
end

Instance Method Details

#downloadObject



14
15
16
17
18
# File 'lib/webex/user/file.rb', line 14

def download
  option_required! :file_name
  { params: generate_params(api_type: 'DF'),
    url: URI.join(CONFIGURATION.host_url + PATH_URL) }
end

#listObject



20
21
22
23
# File 'lib/webex/user/file.rb', line 20

def list
  { params: generate_params(api_type: 'LF'),
    url: URI.join(CONFIGURATION.host_url + PATH_URL) }
end