lib/sportradar/api.rb in sportradar-api-0.12.3 vs lib/sportradar/api.rb in sportradar-api-0.13.0

- old
+ new

@@ -11,27 +11,10 @@ require "sportradar/api/poll" require "sportradar/api/broadcast" require "sportradar/api/soccer" -require "sportradar/api/soccer/boxscore" -require "sportradar/api/soccer/category" -require "sportradar/api/soccer/fact" -require "sportradar/api/soccer/hierarchy" -require "sportradar/api/soccer/match" -require "sportradar/api/soccer/player" -require "sportradar/api/soccer/ranking" -require "sportradar/api/soccer/schedule" -require "sportradar/api/soccer/season" -require "sportradar/api/soccer/standing" -require "sportradar/api/soccer/statistic" -require "sportradar/api/soccer/summary" -require "sportradar/api/soccer/team" -require "sportradar/api/soccer/tournament" -require "sportradar/api/soccer/tournament_group" -require "sportradar/api/soccer/venue" - require "sportradar/api/football" require "sportradar/api/basketball" require "sportradar/api/baseball" @@ -78,11 +61,11 @@ {api: :odds, version: 1}, {api: :content, version: 3}, {api: :images, version: 2}, {api: :live_images, version: 1}, {api: :olympics, version: 2}, - {api: :soccer, version: 2}, + {api: :soccer, version: 3}, {api: :ncaawb, version: 3}, {api: :mma, version: 1}, {api: :cricket, version: 1}, {api: :wnba, version: 3}, {api: :ncaamh, version: 3}, @@ -107,6 +90,22 @@ find_api = API_GALLERY.find{ |x| x[:api] == api.downcase.to_sym } !find_api.nil? ? find_api[:version] : "version missing for #{api}" end end + + def self.ordinalize_period(i) + case i + when 1 + '1st' + when 2 + '2nd' + when 3 + '3rd' + when nil + '' + else + "#{i}th" + end + end + end