Class: SportsApi::Football::OddsBookmakerResource
- Defined in:
- lib/sports_api/football/resources/odds_pre_match/odds_bookmaker.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
- #find(id:) ⇒ Object
-
#list(**params) ⇒ Object
Arguments: id: [Integer](optional) - The bookmaker ID.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from SportsApi::Resource
Instance Method Details
#find(id:) ⇒ Object
14 15 16 17 |
# File 'lib/sports_api/football/resources/odds_pre_match/odds_bookmaker.rb', line 14 def find(id:) response = get_request('odds/bookmakers', params: { id: id.to_s }) SportsApi::Football::OddsBookmaker.new(response.body['response'][0]) end |
#list(**params) ⇒ Object
Arguments: id: [Integer](optional) - The bookmaker ID. search: [String](optional) - The name of the bookmaker (>= XXX).
9 10 11 12 |
# File 'lib/sports_api/football/resources/odds_pre_match/odds_bookmaker.rb', line 9 def list(**params) response = get_request('odds/bookmakers', params:) Collection.from_response(response, type: SportsApi::Football::OddsBookmaker) end |