Class: MLB::TeamHistory
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::TeamHistory
- Defined in:
- lib/mlb/team_history.rb
Overview
Provides methods for fetching team history from the API
Class Method Summary collapse
-
.find(team:) ⇒ Array<Team>
Retrieves historical team records.
Class Method Details
.find(team:) ⇒ Array<Team>
Retrieves historical team records
22 23 24 25 26 |
# File 'lib/mlb/team_history.rb', line 22 def self.find(team:) params = {teamIds: Utils.extract_id(team)} response = CLIENT.get("teams/history?#{Utils.build_query(params)}") from_json(response).teams end |