Module: ESPN::Client::Standings
- Included in:
- ESPN::Client
- Defined in:
- lib/espn/client/standings.rb
Overview
Instance Method Summary collapse
-
#standings(*args) ⇒ Object
Public: Get the latest league and divisional standings from ESPN.
Instance Method Details
#standings(*args) ⇒ Object
Public: Get the latest league and divisional standings from ESPN.
sport - A Symbol or String of the sport (optional). league - A Symbol or String of the league. If a league is passed, but
not a sport, an attempt will be made to map the league to a
sport (required).
opts - Hash options used to refine the selection. If sport and/or
league are passed in, they will override the mapped values
You can find a full list of options on the ESPN developer API
website (default: {}).
Returns an Array of Hashie::Mash.
25 26 27 28 29 |
# File 'lib/espn/client/standings.rb', line 25 def standings(*args) arguments = ESPN::Arguments.new(args, {}, [:league]) pattern = 'sports/:sport/:league/standings' get(pattern, arguments.).sports.first.leagues.first.groups end |