Class: SportsApi::Football::PlayerTopRedCardResource
- Defined in:
- lib/sports_api/football/resources/players/player_top_red_card.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#list(league:, season:) ⇒ Object
Arguments: league: [Integer](required) - The league ID.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from SportsApi::Resource
Instance Method Details
#list(league:, season:) ⇒ Object
Arguments: league: [Integer](required) - The league ID. season: [Integer](required) - The season of the league (= YYYY).
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sports_api/football/resources/players/player_top_red_card.rb', line 9 def list(league:, season:) response = get_request( 'players/topredcards', params: { league: league.to_s, season: season.to_s } ) Collection.from_response(response, type: SportsApi::Football::PlayerTopRedCard) end |