View Source PropOddsAPI.Api.Markets (PropOddsApi v0.0.2)
This module provides functionality to interact with markets data from the PropOdds API.
Summary
Functions
Retrieves market information for a specific game by its ID.
Functions
@spec get_markets(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, PropOddsAPI.Model.Markets.t()} | {:ok, PropOddsAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Retrieves market information for a specific game by its ID.
Parameters
connection: TheTesla.Env.client()used to make the HTTP request.game_id: The unique identifier for the game, as aString.t().api_key: The API key used for authorization, as aString.t().opts: Optional parameters provided as a keyword list. Supports:fantasyas a boolean to indicate whether to include fantasy markets.
Returns
{:ok, PropOddsAPI.Model.Markets.t()}: On success, returns the market information.{: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.