View Source PropOddsAPI.Api.FantasyLines (PropOddsApi v0.0.2)
This module provides functionality to interact with fantasy lines data from the PropOdds API.
Summary
Functions
Fetches fantasy lines for a given game and market.
Functions
Link to this function
get_fantasy_lines(connection, game_id, market, api_key, opts \\ [])
View Source@spec get_fantasy_lines( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, PropOddsAPI.Model.FantasyBooks.t()} | {:ok, PropOddsAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Fetches fantasy lines for a given 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 fantasy lines 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.
Returns
{:ok, PropOddsAPI.Model.FantasyBooks.t()}: On success, returns the fantasy books data.{: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.
Examples
iex> PropOddsAPI.Api.FantasyLines.get_fantasy_lines(connection, "game123", "marketABC", "api_key_xyz", active_only: true)
{:ok, %PropOddsAPI.Model.FantasyBooks{}}