Sha256: 20c4d5cece517fd71e3a558873523a2a273bb6f25cbec3e43fc8e2574280cbb6

Contents?: true

Size: 1.22 KB

Versions: 57

Compression:

Stored size: 1.22 KB

Contents

module Sportradar
  module Api
    module Basketball
      class Ncaamb
        class Game < Sportradar::Api::Basketball::Game

          # NCAA MB specific

          def team_class
            Team
          end
          def period_class
            Half
          end

          def period_name
            'half'
          end
          alias :half :period
          alias :halfs :periods

          def api
            @api || Sportradar::Api::Basketball::Ncaamb.new
          end

        end
      end
    end
  end
end

__END__

ss = sr.schedule;
sr = Sportradar::Api::Basketball::Ncaamb.new
gid = "29111b80-992d-4e32-a88d-220fb4bd3121"
g = Sportradar::Api::Basketball::Ncaamb::Game.new({'id' => gid}, api: sr)
sd = sr.daily_schedule;
sd = sr.daily_schedule(Date.new(2017,1,21))
g = sd.games.detect{ |g| g.id == gid }
g = sd.games.last;
box = g.get_box;
sum = g.get_summary;
pbp = g.get_pbp;
g.periods.size
g.plays.size

Sportradar::Api::Basketball::Nba::Team.all.size # => 32 - includes all star teams

g1 = sd.games.first;
sd = sr.schedule;
sd = sr.daily_schedule;
sr = Sportradar::Api::Basketball::Nba.new
sd = sr.daily_schedule(Date.yesterday);
g = sd.games.last;
g.get_summary;
g.get_pbp;
g.get_box;
g.scoring
g.get_pbp; g.changed? :pbp

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
sportradar-api-0.10.36 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.35 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.34 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.33 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.32 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.31 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.30 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.29 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.28 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.27 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.26 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.25 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.24 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.23 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.22 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.21 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.20 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.19 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.18 lib/sportradar/api/basketball/ncaamb/game.rb
sportradar-api-0.10.17 lib/sportradar/api/basketball/ncaamb/game.rb