Module: Veeam

Extended by:
WrAPI::Configuration, WrAPI::RespondTo
Defined in:
lib/veeam.rb,
lib/veeam/api.rb,
lib/veeam/error.rb,
lib/veeam/client.rb,
lib/veeam/version.rb,
lib/veeam/pagination.rb,
lib/veeam/client/about.rb,
lib/veeam/client/alarms.rb,
lib/veeam/authentication.rb,
lib/veeam/client/companies.rb,
lib/veeam/client/infrastructure.rb

Defined Under Namespace

Modules: Authentication, RequestPagination Classes: API, AuthenticationError, Client, ConfigurationError, VeeamError

Constant Summary collapse

DEFAULT_UA =
"Veeam Ruby API wrapper #{Veeam::VERSION}".freeze
DEFAULT_OPTIONS =

default options to remove Accept header from WrAPI

{ headers:{ 'User-Agent': DEFAULT_UA } }
DEFAULT_PAGINATION =
RequestPagination::PagingInfoPager
VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.client(options = {}) ⇒ Veeam::Client

Alias for Veeam::Client.new

Returns:



18
19
20
21
22
23
24
# File 'lib/veeam.rb', line 18

def self.client(options = {})
  Veeam::Client.new({
    connection_options: DEFAULT_OPTIONS,
    user_agent: DEFAULT_UA,
    pagination_class: DEFAULT_PAGINATION
  }.merge(options))
end

.resetObject



26
27
28
29
30
31
32
# File 'lib/veeam.rb', line 26

def self.reset
  super
  self.endpoint   = nil
  self.user_agent = DEFAULT_UA
  self.connection_options = DEFAULT_OPTIONS
  self.pagination_class = DEFAULT_PAGINATION
end