lib/sportradar/api/football/stat_pack/penalties.rb in sportradar-api-0.10.55 vs lib/sportradar/api/football/stat_pack/penalties.rb in sportradar-api-0.11.0
- old
+ new
@@ -5,11 +5,11 @@
alias :count :penalties
def set_stats
@response = (response.dig(1) || {}) if response.is_a? Array
- @penalties = response.dig('penalties')
- @yards = response.dig('yards')
+ @penalties = response.dig('penalties') || response['num']
+ @yards = response.dig('yards') || response['yds']
end
def formatted
"#{count}-#{yards}"
end