Class: Leipzig::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/leipzig/client.rb

Direct Known Subclasses

Calendar, District, Mediahandbook

Constant Summary collapse

API_URL =
'http://www.apileipzig.de/api/v1'
KEYWORDS =
[:limit, :offset, :format]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Client

Constructor

Parameters:

  • API (String)

    Key to use



15
16
17
18
19
# File 'lib/leipzig/client.rb', line 15

def initialize(api_key)
  @api_key = api_key
  @conditions = { :limit => 10, :name => 'leipzig', :api_key => @api_key }
  register_methods
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



10
11
12
# File 'lib/leipzig/client.rb', line 10

def api_key
  @api_key
end