Module: Alma::ApiDefaults

Included in:
Bib, BibHolding, BibItem, BibRequest, Course, Fine, Library, Loan, Location, RequestOptions, User, UserRequest
Defined in:
lib/alma/api_defaults.rb

Instance Method Summary collapse

Instance Method Details

#apikeyObject



5
6
7
# File 'lib/alma/api_defaults.rb', line 5

def apikey
  Alma.configuration.apikey
end

#bibs_base_pathObject



19
20
21
# File 'lib/alma/api_defaults.rb', line 19

def bibs_base_path
  "#{self.region}/almaws/v1/bibs"
end

#configuration_base_pathObject



31
32
33
# File 'lib/alma/api_defaults.rb', line 31

def configuration_base_path
  "#{self.region}/almaws/v1/conf"
end

#headersObject



13
14
15
16
17
# File 'lib/alma/api_defaults.rb', line 13

def headers
  { "Authorization": "apikey #{self.apikey}",
  "Accept": "application/json",
  "Content-Type": "application/json" }
end

#items_base_pathObject



27
28
29
# File 'lib/alma/api_defaults.rb', line 27

def items_base_path
  "#{self.region}/almaws/v1/items"
end

#regionObject



9
10
11
# File 'lib/alma/api_defaults.rb', line 9

def region
  Alma.configuration.region
end

#timeoutObject



35
36
37
# File 'lib/alma/api_defaults.rb', line 35

def timeout
  Alma.configuration.timeout
end

#users_base_pathObject



23
24
25
# File 'lib/alma/api_defaults.rb', line 23

def users_base_path
  "#{self.region}/almaws/v1/users"
end