Class: SportsApi::Football::StandingResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/sports_api/football/resources/standing.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(season:, **params) ⇒ Object

Arguments: league: [Integer](optional) - The league ID. season: [Integer] (required) - The season of the league (= YYYY). team: [Integer] (optional) - The team ID.



10
11
12
13
# File 'lib/sports_api/football/resources/standing.rb', line 10

def list(season:, **params)
  response = get_request('standings', params: { season: season.to_s, **params })
  Collection.from_response(response, type: SportsApi::Football::Standing)
end