lib/kentaa/api/config.rb in kentaa-api-0.5.0 vs lib/kentaa/api/config.rb in kentaa-api-0.6.0
- old
+ new
@@ -5,14 +5,17 @@
class Config
LIVE_URL = "https://api.kentaa.nl/v1"
TEST_URL = "https://api.kentaa.staatklaar.nu/v1"
DEV_URL = "http://api.lvh.me:3000/v1"
- attr_accessor :api_key, :options
+ attr_accessor :options
- def initialize(api_key, options = {})
- @api_key = api_key
+ def initialize(options = {})
@options = options
+ end
+
+ def api_key
+ options.fetch(:api_key)
end
def api_url
case environment
when :test