Module: Alma::ApiDefaults
- Included in:
- Bib, BibItem, BibRequest, Fine, Loan, RequestOptions, User, UserRequest
- Defined in:
- lib/alma/api_defaults.rb
Instance Method Summary collapse
- #apikey ⇒ Object
- #bibs_base_path ⇒ Object
- #headers ⇒ Object
- #region ⇒ Object
- #timeout ⇒ Object
- #users_base_path ⇒ Object
Instance Method Details
#apikey ⇒ Object
4 5 6 |
# File 'lib/alma/api_defaults.rb', line 4 def apikey Alma.configuration.apikey end |
#bibs_base_path ⇒ Object
18 19 20 |
# File 'lib/alma/api_defaults.rb', line 18 def bibs_base_path "#{self.region}/almaws/v1/bibs" end |
#headers ⇒ Object
12 13 14 15 16 |
# File 'lib/alma/api_defaults.rb', line 12 def headers { "Authorization": "apikey #{self.apikey}", "Accept": "application/json", "Content-Type": "application/json" } end |
#region ⇒ Object
8 9 10 |
# File 'lib/alma/api_defaults.rb', line 8 def region Alma.configuration.region end |
#timeout ⇒ Object
26 27 28 |
# File 'lib/alma/api_defaults.rb', line 26 def timeout Alma.configuration.timeout end |
#users_base_path ⇒ Object
22 23 24 |
# File 'lib/alma/api_defaults.rb', line 22 def users_base_path "#{self.region}/almaws/v1/users" end |