Class: SportsOddsAPI::Resources::Sports
- Inherits:
-
Object
- Object
- SportsOddsAPI::Resources::Sports
- Defined in:
- lib/sports_odds_api/resources/sports.rb,
sig/sports_odds_api/resources/sports.rbs
Instance Method Summary collapse
-
#get(request_options: {}) ⇒ Array<SportsOddsAPI::Models::Sport>
Get a list of sports.
-
#initialize(client:) ⇒ Sports
constructor
private
A new instance of Sports.
Constructor Details
#initialize(client:) ⇒ Sports
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Sports.
28 29 30 |
# File 'lib/sports_odds_api/resources/sports.rb', line 28 def initialize(client:) @client = client end |
Instance Method Details
#get(request_options: {}) ⇒ Array<SportsOddsAPI::Models::Sport>
Get a list of sports
15 16 17 18 19 20 21 22 23 |
# File 'lib/sports_odds_api/resources/sports.rb', line 15 def get(params = {}) @client.request( method: :get, path: "sports/", unwrap: :data, model: SportsOddsAPI::Internal::Type::ArrayOf[SportsOddsAPI::Sport], options: params[:request_options] ) end |