Module: MLBStatsAPI::Sports
- Included in:
- Client
- Defined in:
- lib/mlb_stats_api/sports.rb
Overview
Operations pertaining to sports
Instance Method Summary collapse
-
#sport(sport_id, options = {}) ⇒ Object
View information for any given sportId.
-
#sport_players(sport_id, season, options = {}) ⇒ Object
View information on a players for a given sportId.
-
#sports ⇒ Object
View information for all sportIds.
Instance Method Details
#sport(sport_id, options = {}) ⇒ Object
View information for any given sportId.
15 16 17 |
# File 'lib/mlb_stats_api/sports.rb', line 15 def sport(sport_id, = {}) get "/sports/#{sport_id}", end |
#sport_players(sport_id, season, options = {}) ⇒ Object
View information on a players for a given sportId.
21 22 23 24 25 |
# File 'lib/mlb_stats_api/sports.rb', line 21 def sport_players(sport_id, season, = {}) [:season] = season get "/sports/#{sport_id}/players", end |
#sports ⇒ Object
View information for all sportIds.
9 10 11 |
# File 'lib/mlb_stats_api/sports.rb', line 9 def sports get '/sports' end |