Class: Montague::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/montague/api/base.rb

Overview

Base API

Direct Known Subclasses

Client, Journal, Publisher

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Base

Returns a new instance of Base.

Parameters:

  • config (Hash) (defaults to: {})

Options Hash (config):

  • :api_url (String)

    URL of the SHERPA/RoMEO service (if it changes)

  • :api_key (String)

    API key of the SHERPA/RoMEO service user


12
13
14
15
# File 'lib/montague/api/base.rb', line 12

def initialize(config = {})
  @config = config
  @config[:api_url] = 'http://www.sherpa.ac.uk/romeo/api29.php' unless config[:api_url]
end