Class: SportsApi::Football::PlayerResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/sports_api/football/resources/players/player.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: id: Integer - The player ID. team: Integer - The team ID. league: Integer - The league ID. season: Integer - The season of the league (= YYYY). Requires the fields Id, League or Team search: String - The name of the coach (>= XXXX). page: Integer - Use for the pagination (default: 1).



14
15
16
17
# File 'lib/sports_api/football/resources/players/player.rb', line 14

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