lib/sportradar/api.rb in sportradar-api-0.1.0 vs lib/sportradar/api.rb in sportradar-api-0.1.1

- old
+ new

@@ -8,10 +8,12 @@ require "sportradar/api/error" require "sportradar/api/request" require "sportradar/api/soccer" require "sportradar/api/nfl" +require "sportradar/api/images" +require "sportradar/api/live_images" module Sportradar module Api API_GALLERY = [ @@ -46,10 +48,10 @@ def self.api_key_params(api) { api_key: self.api_key(api) } end def self.api_key(api) - ENV.fetch("SPORTRADAR_#{api.to_s.upcase}", "api_key missing for #{api}") + ENV.fetch("SPORTRADAR_#{api.to_s.upcase.gsub('-', '_')}", "api_key missing for #{api}") end def self.version(api) find_api = API_GALLERY.find{ |x| x[:api] == api.downcase.to_sym } !find_api.nil? ? find_api[:version] : "version missing for #{api}"