Module: AlPapi

Defined in:
lib/al_papi.rb,
lib/al_papi/http.rb,
lib/al_papi/config.rb,
lib/al_papi/account.rb,
lib/al_papi/engines.rb,
lib/al_papi/keyword.rb,
lib/al_papi/locales.rb,
lib/al_papi/response.rb,
lib/al_papi/web_insight.rb,
lib/al_papi/request_error.rb

Defined Under Namespace

Classes: Account, Config, Engines, Http, Keyword, Locales, RequestError, Response, WebInsight

Class Method Summary collapse

Class Method Details

.configAlPapi::Config

Returns:



37
38
39
# File 'lib/al_papi.rb', line 37

def config
  @config ||= Config.new
end

.configure {|config| ... } ⇒ Object

Examples:

Configure takes block to set API key to be used in API calls.

AlPapi.configure do |config|
  config.api_key = 'my-key'
end

Yields:



29
30
31
# File 'lib/al_papi.rb', line 29

def configure
  yield config
end

.httpObject



42
43
44
# File 'lib/al_papi.rb', line 42

def http # @private
  Http.new(config)
end