Sha256: 14c0c1c9d282c3682cdb942e91351a40f649f6b91e7d96afbaa7eec3db988dec

Contents?: true

Size: 949 Bytes

Versions: 1

Compression:

Stored size: 949 Bytes

Contents

module Sportradar
  module Api
    module Football
      class Ncaafb
        class Team < Sportradar::Api::Football::Team

          def players
            get_roster if @players_hash.empty?
            @players_hash.values
          end
          alias :roster :players
          
          def player_class
            Player
          end

          def path_roster
            "#{ path_base }/roster"
          end
          def path_season_stats(year = season_year, season = ncaafb_season)
            "#{path_base}/#{year}/#{ncaafb_season}/statistics"
          end

          def api
            @api || Sportradar::Api::Football::Ncaafb::Api.new
          end
          def ncaafb_season
            @type || default_season
          end

        end

      end
    end
  end
end

__END__

ncaafb = Marshal.load(File.binread('ncaafb.bin'));

t = ncaafb.teams.first
data = t.get_season_stats
data = t.get_season_stats(2016)
t.players.count

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sportradar-api-0.11.0 lib/sportradar/api/football/ncaafb/team.rb