class Sports::Butler::SoccerApi::FootballDataOrg::HeadToHead
Public Instance Methods
available_endpoint_methods()
click to toggle source
# File lib/sports/butler/soccer_api/football_data_org/head_to_head.rb, line 8 def available_endpoint_methods [:by_match] end
by_match(match_id:, filters: {})
click to toggle source
# File lib/sports/butler/soccer_api/football_data_org/head_to_head.rb, line 12 def by_match(match_id:, filters: {}) api.get(path: "#{path}/#{match_id}", filters: filters) response = api.response.parsed_response if response.is_a?(Hash) && response.with_indifferent_access.dig(:head2head) api.parsed_response = response['head2head'] else api.parsed_response = response end api end