lib/sportradar/api/soccer.rb in sportradar-api-0.1.4 vs lib/sportradar/api/soccer.rb in sportradar-api-0.1.5

- old
+ new

@@ -12,16 +12,17 @@ def schedule response = get request_url("matches/schedule") Sportradar::Api::Soccer::Schedule.new response end + # date = Date.parse('2016-07-17') def daily_schedule(date = Date.today) response = get request_url("matches/#{date_path(date)}/schedule") Sportradar::Api::Soccer::Schedule.new response end - # date = Date.parse('2016-07-17') + def daily_summary(date = Date.today) response = get request_url("matches/#{date_path(date)}/summary") Sportradar::Api::Soccer::Summary.new response end @@ -46,26 +47,28 @@ def team_profile(team_id) response = get request_url("teams/#{team_id}/profile") Sportradar::Api::Soccer::Team.new response["profile"]["team"] if response.success? end - # player_id = "2aeacd39-3f9c-42af-957e-9df8573973c4" def player_profile(player_id) response = get request_url("players/#{player_id}/profile") Sportradar::Api::Soccer::Player.new response["profile"]["player"] if response.success? && response["profile"] && response["profile"]["player"] end def player_rankings - get request_url("players/leader") + response = get request_url("players/leader") + Sportradar::Api::Soccer::Ranking.new response["leaders"] if response.success? && response["leaders"] end def team_hierarchy - get request_url("teams/hierarchy") + response = get request_url("teams/hierarchy") + Sportradar::Api::Soccer::Hierarchy.new response["hierarchy"] if response.success? && response["hierarchy"] end def team_standings - get request_url("teams/standing") + response = get request_url("teams/standing") + Sportradar::Api::Soccer::Standing.new response["standings"] if response.success? && response["standings"] end private def request_url(path)