Class: MLB::PostseasonSeries
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::PostseasonSeries
- Defined in:
- lib/mlb/postseason_series.rb
Overview
Provides methods for fetching postseason series from the API
Class Method Summary collapse
-
.all(season: nil, sport: Utils::DEFAULT_SPORT_ID) ⇒ Array<PostseasonSeriesEntry>
Retrieves postseason series for a season.
Class Method Details
.all(season: nil, sport: Utils::DEFAULT_SPORT_ID) ⇒ Array<PostseasonSeriesEntry>
Retrieves postseason series for a season
47 48 49 50 51 52 |
# File 'lib/mlb/postseason_series.rb', line 47 def self.all(season: nil, sport: Utils::DEFAULT_SPORT_ID) season ||= Utils.current_season params = {season:, sportId: Utils.extract_id(sport)} response = CLIENT.get("schedule/postseason/series?#{Utils.build_query(params)}") from_json(response).series end |