Class: AlmaApi::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/alma_api/configuration.rb

Constant Summary collapse

GATEWAYS =
{
  na: "https://api-na.hosted.exlibrisgroup.com/almaws/v1", # North America
  eu: "https://api-eu.hosted.exlibrisgroup.com/almaws/v1", # Europe
  ap: "https://api-ap.hosted.exlibrisgroup.com/almaws/v1", # Asia-Pacific
  ca: "https://api-ca.hosted.exlibrisgroup.com/almaws/v1", # Canada
  cn: "https://api-cn.hosted.exlibrisgroup.cn/almaws/v1"   # China
}.freeze
DEFAULT_FORMAT =
"json".freeze
DEFAULT_LANGUAGE =
"en".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, base_url: nil, default_format: nil, language: nil) ⇒ Configuration

Returns a new instance of Configuration.



20
21
22
23
24
25
# File 'lib/alma_api/configuration.rb', line 20

def initialize(api_key: nil, base_url: nil, default_format: nil, language: nil)
  self.api_key = api_key
  self.base_url = base_url
  self.default_format = default_format
  self.language = language
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



15
16
17
# File 'lib/alma_api/configuration.rb', line 15

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



15
16
17
# File 'lib/alma_api/configuration.rb', line 15

def base_url
  @base_url
end

#default_formatObject

Returns the value of attribute default_format.



15
16
17
# File 'lib/alma_api/configuration.rb', line 15

def default_format
  @default_format
end

#languageObject

Returns the value of attribute language.



15
16
17
# File 'lib/alma_api/configuration.rb', line 15

def language
  @language
end