View Source PropOddsAPI.Api.Participants (PropOddsApi v0.0.2)

This module provides functionality to interact with markets data from the PropOdds API.

Summary

Functions

Retrieves information for a specific participant by their ID.

Looks up a participant by their name.

Functions

Link to this function

get_player(connection, participant_id, api_key, opts \\ [])

View Source

Retrieves information for a specific participant by their ID.

Parameters

  • connection: The Tesla.Env.client() used to make the HTTP request.
  • participant_id: The unique identifier for the participant, as an integer().
  • api_key: The API key used for authorization, as a String.t().
  • opts: Optional parameters provided as a keyword list (currently unused).

Returns

  • {:ok, PropOddsAPI.Model.Participant.t()}: On success, returns the participant 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.
Link to this function

lookup_player(connection, name, api_key, opts \\ [])

View Source

Looks up a participant by their name.

Parameters

  • connection: The Tesla.Env.client() used to make the HTTP request.
  • name: The name of the participant to look up, as a String.t().
  • api_key: The API key used for authorization, as a String.t().
  • opts: Optional parameters provided as a keyword list (currently unused).

Returns

  • {:ok, PropOddsAPI.Model.Participant.t()}: On success, returns the participant 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.