View Source PropOddsAPI.Api.Odds (PropOddsApi v0.0.2)
This module provides functionality to interact with odds data from the PropOdds API.
Summary
Functions
Retrieves the odds for a specific game and market.
Functions
@spec get_odds(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, PropOddsAPI.Model.SportsBooks.t()} | {:ok, PropOddsAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Retrieves the odds for a specific game and market.
Parameters
connection: TheTesla.Env.client()used to make the HTTP request.game_id: The unique identifier for the game, as aString.t().market: The market type for which the odds are being requested, as aString.t().api_key: The API key used for authorization, as aString.t().opts: Optional parameters provided as a keyword list. Can include:active_onlyand:end_datetimeto filter the results.
Returns
{:ok, PropOddsAPI.Model.SportsBooks.t()}: On success, returns the odds from various sportsbooks.{:ok, PropOddsAPI.Model.HttpValidationError.t()}: If there's a validation error with the HTTP request.{:error, Tesla.Env.t()}: On failure, returns the error within the Tesla environment.