Exception: Europeana::Errors::MissingAPIKeyError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/europeana/errors.rb

Overview

Raised if API requests are attempted without the API key having been set.

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ MissingAPIKeyError

Returns a new instance of MissingAPIKeyError.


7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/europeana/errors.rb', line 7

def initialize(msg = nil)
 msg ||= <<-MSG
Missing API key.

The Europeana API key has not been set.

Sign up for an API key at: http://labs.europeana.eu/api/registration/

Set the key with:

  Europeana.api_key = "xyz"
 MSG
 super(msg)
end