Class: SportsApi::Football::InjuryResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/sports_api/football/resources/injury.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#get_request, #initialize

Constructor Details

This class inherits a constructor from SportsApi::Resource

Instance Method Details

#list(**params) ⇒ Object

Arguments: fixture: Integer - The fixture ID. league: Integer - The league ID. team: Integer - The team ID. player: Integer - The player ID. season: Integer - The season of the league, required with league, team and player parameters (= YYYY). date: String - A valid date (= YYYY-MM-DD). timezone: String - A valid timezone from the endpoint Timezone.



15
16
17
18
# File 'lib/sports_api/football/resources/injury.rb', line 15

def list(**params)
  response = get_request('injuries', params:)
  Collection.from_response(response, type: SportsApi::Football::Injury)
end