Sha256: 4c1e24828895ddf6082652fa03de7f1adc39790ac2e5a23f11d6e25289ec5411

Contents?: true

Size: 1.28 KB

Versions: 101

Compression:

Stored size: 1.28 KB

Contents

module Sportradar
  module Api
    class Football::StatPack::Passing < Football::StatPack
      attr_accessor :attempts, :completions, :cmp_pct, :yards, :avg_yards, :sacks, :sack_yards, :touchdowns, :longest, :interceptions, :rating, :longest_touchdown, :air_yards, :net_yards, :redzone_attempts

      def set_stats
        @attempts          = response["attempts"]
        @completions       = response["completions"]
        @cmp_pct           = response["cmp_pct"]
        @yards             = response["yards"] # 'yards' is air yards, which does not include sack yardage. air_yards is for college, net_yards for NFL
        @avg_yards         = response["avg_yards"]
        @sacks             = response["sacks"]
        @sack_yards        = response["sack_yards"]
        @touchdowns        = response["touchdowns"]
        @longest           = response["longest"]
        @interceptions     = response["interceptions"]
        @rating            = response["rating"]
        @longest_touchdown = response["longest_touchdown"]
        @air_yards         = response["air_yards"]
        @net_yards         = response["net_yards"] # passing net_yards is the correct measure for team stats, as it includes sack yardage
        @redzone_attempts  = response["redzone_attempts"]
      end
    end

  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
sportradar-api-0.10.15 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.14 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.13 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.12 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.11 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.10 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.9 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.8 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.7 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.6 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.5 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.4 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.3 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.2 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.1 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.10.0 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.9.59 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.9.58 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.9.57 lib/sportradar/api/football/stat_pack/passing.rb
sportradar-api-0.9.56 lib/sportradar/api/football/stat_pack/passing.rb