Sha256: a671ef637a34f5cc3f3a333194633c32f7b05001d740e1c2fbfabb44880dd04a

Contents?: true

Size: 1.06 KB

Versions: 24

Compression:

Stored size: 1.06 KB

Contents

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

          def alias
            id
          end

          def used_timeouts
            3 - remaining_timeouts.to_i
          end

          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

24 entries across 24 versions & 1 rubygems

Version Path
sportradar-api-0.11.67 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.66 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.65 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.64 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.63 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.62 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.61 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.60 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.59 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.58 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.57 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.56 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.55 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.54 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.53 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.52 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.51 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.50 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.49 lib/sportradar/api/football/ncaafb/team.rb
sportradar-api-0.11.48 lib/sportradar/api/football/ncaafb/team.rb