lib/sportradar/api/basketball/ncaamb.rb in sportradar-api-0.10.2 vs lib/sportradar/api/basketball/ncaamb.rb in sportradar-api-0.10.3

- old
+ new

@@ -18,11 +18,25 @@ else @error = response end end - def daily_schedule(date = default_date, ncaa_season = default_season) + def tournaments(season_year = default_year, ncaamb_season = 'pst') + raise Sportradar::Api::Error::InvalidSeason unless allowed_seasons.include? ncaamb_season + response = get request_url("tournaments/#{season_year}/#{ncaamb_season}/schedule") + if response.success? + Sportradar::Api::Basketball::Ncaamb::Season.new(response.to_h, api: self) + else + @error = response + end + end + + def conference_tournaments(season_year = default_year) + tournaments(season_year, 'ct') + end + + def daily_schedule(date = default_date) response = get request_url("games/#{ date.year }/#{ date.month }/#{ date.day }/schedule") if response.success? Sportradar::Api::Basketball::Ncaamb::Schedule.new(response.to_h, api: self) else @error = response @@ -123,10 +137,12 @@ end __END__ sr = Sportradar::Api::Basketball::Ncaamb.new -ss = sr.schedule; +ss = sr.schedule(2015, 'ct'); +ss = sr.schedule(2015, 'pst'); +rank = sr.rankings('US'); ds = sr.daily_schedule; # not ready lh = sr.league_hierarchy; ls = sr.standings; \ No newline at end of file