Module: CloudAlly

Extended by:
WrAPI::Configuration, WrAPI::RespondTo
Defined in:
lib/cloudally.rb,
lib/cloudally/api.rb,
lib/cloudally/error.rb,
lib/cloudally/client.rb,
lib/cloudally/version.rb,
lib/cloudally/pagination.rb,
lib/cloudally/authentication.rb,
lib/cloudally/client/partners.rb

Defined Under Namespace

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

Constant Summary collapse

DEFAULT_ENDPOINT =
'https://api.cloudally.com/v1/'.freeze
DEFAULT_USERAGENT =
"CloudAlly Ruby API wrapper #{CloudAlly::VERSION}".freeze
DEFAULT_PAGINATION =
CloudAlly::RequestPagination::Pager
VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

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

Alias for CloudAlly::Client.new

Returns:



19
20
21
22
23
24
25
# File 'lib/cloudally.rb', line 19

def self.client(options = {})
  CloudAlly::Client.new({
    endpoint: DEFAULT_ENDPOINT,
    user_agent: DEFAULT_USERAGENT,
    pagination_class: DEFAULT_PAGINATION
  }.merge(options))
end

.resetObject



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

def self.reset
  super
  self.endpoint = DEFAULT_ENDPOINT
  self.user_agent = DEFAULT_USERAGENT
  self.pagination_class = DEFAULT_PAGINATION
end