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
- #apikey ⇒ Object
- #bibs_base_path ⇒ Object
- #configuration_base_path ⇒ Object
- #headers ⇒ Object
- #items_base_path ⇒ Object
- #region ⇒ Object
- #timeout ⇒ Object
- #users_base_path ⇒ Object
Instance Method Details
#apikey ⇒ Object
5 6 7 |
# File 'lib/alma/api_defaults.rb', line 5 def apikey Alma.configuration.apikey end |
#bibs_base_path ⇒ Object
19 20 21 |
# File 'lib/alma/api_defaults.rb', line 19 def bibs_base_path "#{self.region}/almaws/v1/bibs" end |
#configuration_base_path ⇒ Object
31 32 33 |
# File 'lib/alma/api_defaults.rb', line 31 def configuration_base_path "#{self.region}/almaws/v1/conf" end |
#headers ⇒ Object
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_path ⇒ Object
27 28 29 |
# File 'lib/alma/api_defaults.rb', line 27 def items_base_path "#{self.region}/almaws/v1/items" end |
#region ⇒ Object
9 10 11 |
# File 'lib/alma/api_defaults.rb', line 9 def region Alma.configuration.region end |
#timeout ⇒ Object
35 36 37 |
# File 'lib/alma/api_defaults.rb', line 35 def timeout Alma.configuration.timeout end |
#users_base_path ⇒ Object
23 24 25 |
# File 'lib/alma/api_defaults.rb', line 23 def users_base_path "#{self.region}/almaws/v1/users" end |