lib/sportradar/api.rb in sportradar-api-0.1.19 vs lib/sportradar/api.rb in sportradar-api-0.1.21
- old
+ new
@@ -52,12 +52,19 @@
require "sportradar/api/nfl/summary"
require "sportradar/api/nfl/team"
require "sportradar/api/nfl/venue"
require "sportradar/api/nfl/week"
-require "sportradar/api/images"
require "sportradar/api/live_images"
+require "sportradar/api/images"
+require "sportradar/api/images/asset_list"
+require "sportradar/api/images/asset"
+require "sportradar/api/images/link"
+require "sportradar/api/images/tag"
+
+
+
require "sportradar/api/content"
require "sportradar/api/odds"
module Sportradar
module Api
@@ -89,15 +96,15 @@
]
private
- def self.api_key_params(api)
- { api_key: self.api_key(api) }
+ def self.api_key_params(api, access_level = 'trial')
+ { api_key: self.api_key(api, access_level) }
end
- def self.api_key(api)
- ENV.fetch("SPORTRADAR_#{api.to_s.upcase.gsub('-', '_')}", "api_key missing for #{api}")
+ def self.api_key(api, access_level = 'trial')
+ ENV.fetch("SPORTRADAR_#{api.to_s.upcase.gsub('-', '_')}#{'_PRODUCTION' if access_level == 'production'}", "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}"