module SportsDataApi::Ncaamb

Constants

API_VERSION
BASE_URL
DIR
SPORT

Public Class Methods

daily(year, month, day) click to toggle source

Fetches NCAAMB daily schedule for a given date

# File lib/sports_data_api/ncaamb.rb, line 53
def daily(year, month, day)
  Games.new(response_xml_xpath("/games/#{year}/#{month}/#{day}/schedule.xml", 'league/daily-schedule'))
end
game_summary(game) click to toggle source

Fetches NCAAMB game summary for a given game

# File lib/sports_data_api/ncaamb.rb, line 41
def game_summary(game)
  Game.new(xml: response_xml_xpath("/games/#{game}/summary.xml", '/game'))
end
schedule(year, season) click to toggle source

Fetches NCAAAMB season schedule for a given year and season

# File lib/sports_data_api/ncaamb.rb, line 26
def schedule(year, season)
  season = season.to_s.upcase.to_sym
  raise Error.new("#{season} is not a valid season") unless Season.valid?(season)

  Season.new(response_xml_xpath("/games/#{year}/#{season}/schedule.xml", '/league/season-schedule'))
end
team_roster(team) click to toggle source

Fetches NCAAMB team roster

# File lib/sports_data_api/ncaamb.rb, line 35
def team_roster(team)
  Team.new(response_xml_xpath("/teams/#{team}/profile.xml", 'team'))
end
teams() click to toggle source

Fetches all NCAAMB teams

# File lib/sports_data_api/ncaamb.rb, line 47
def teams
  Teams.new(response_xml_xpath('/league/hierarchy.xml', '/league'))
end
tournament_list(year, season) click to toggle source

Fetches NCAAAMB tournaments for a given year and season

# File lib/sports_data_api/ncaamb.rb, line 58
def tournament_list(year, season)
  season = season.to_s.upcase.to_sym
  raise Error.new("#{season} is not a valid season") unless TournamentList.valid?(season)

  TournamentList.new(response_xml_xpath("/tournaments/#{year}/#{season}/schedule.xml", '/league/season-schedule'))
end
tournament_schedule(year, season, tournament_id) click to toggle source
# File lib/sports_data_api/ncaamb.rb, line 65
def tournament_schedule(year, season, tournament_id)
  raise Error.new("#{season} is not a valid season") unless TournamentSchedule.valid?(season)

  TournamentSchedule.new(year, season, response_xml_xpath("/tournaments/#{tournament_id}/schedule.xml", '/league/tournament-schedule'))
end