Sha256: fc32391b5e9a265e61cc3d9992ce1fdc1b3b89bdc093d51a63e8683205de0164

Contents?: true

Size: 690 Bytes

Versions: 10

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

module Alma
  module ApiDefaults
    def apikey
      Alma.configuration.apikey
    end

    def region
      Alma.configuration.region
    end

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

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

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

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

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

    def timeout
      Alma.configuration.timeout
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alma-0.6.2 lib/alma/api_defaults.rb
alma-0.6.1 lib/alma/api_defaults.rb
alma-0.6.0 lib/alma/api_defaults.rb
alma-0.5.1 lib/alma/api_defaults.rb
alma-0.5.0 lib/alma/api_defaults.rb
alma-0.4.2 lib/alma/api_defaults.rb
alma-0.4.1 lib/alma/api_defaults.rb
alma-0.4.0 lib/alma/api_defaults.rb
alma-0.3.3 lib/alma/api_defaults.rb
alma-0.3.2 lib/alma/api_defaults.rb