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](optional) - The fixture ID. league: [Integer](optional) - The league ID. team: [Integer](optional) - The team ID. player: [Integer](optional) - The player ID. season: [Integer](optional) - The season of the league, required with league,

team and player parameters (= YYYY).

date: [String](optional) - A valid date (= YYYY-MM-DD). timezone: [String](optional) - 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