Sha256: de3439f8458cb0dad57faa8f92aba81a0884f12fb861fab49fb3215a9fbd6565
Contents?: true
Size: 512 Bytes
Versions: 1
Compression:
Stored size: 512 Bytes
Contents
# frozen_string_literal: true module MLBStatsAPI # Operations pertaining to sports module Sports # View information for all sports. def sports = get('/sports') # View information for any given sport ID. def sport(sport_id, **options) = get("/sports/#{sport_id}", **options) # View information on all players for a given sport ID, optionally filtered by season. def sport_players(sport_id, season, **options) = get("/sports/#{sport_id}/players", **options.merge(season:)) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mlb_stats_api-0.4.0 | lib/mlb_stats_api/sports.rb |