lib/sportradar/api/odds/competition.rb in sportradar-api-0.17.6 vs lib/sportradar/api/odds/competition.rb in sportradar-api-0.18.0

- old
+ new

@@ -1,10 +1,10 @@ module Sportradar module Api module Odds class Competition < Data - attr_accessor :response, :api, :id, :name, :gender, :markets, :futures, :player_props + attr_accessor :response, :api, :id, :name, :gender def initialize(data, **opts) @response = data @api = opts[:api] @@ -26,12 +26,16 @@ def sport_events @sport_events_hash.values end def get_player_props - data = api.get_data(path_player_props) + data = fetch_player_props create_data(@sport_events_hash, data["competition_sport_events_players_props"], klass: SportEvent, api: api) data + end + + def fetch_player_props + api.get_data(path_player_props) end # url path helpers def path_base "competitions/#{id}"