Module: MLBStatsAPI::Standings
- Included in:
- Client
- Defined in:
- lib/mlb_stats_api/standings.rb
Overview
Operations pertaining to standings
Instance Method Summary collapse
-
#standings(options = {}) ⇒ Object
View standings for a league.
Instance Method Details
#standings(options = {}) ⇒ Object
View standings for a league.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mlb_stats_api/standings.rb', line 9 def standings( = {}) [:hydrate] = 'team' unless .key?(:hydrate) if [:leagues] && ![:leagueId] league_ids = Leagues::LEAGUES.values_at(*.delete(:leagues)) [:leagueId] = league_ids end [:leagueId] = [103, 104] unless Array([:leagueId])&.any? get '/standings', end |