ExFPL.Entries (ExFPL v0.1.0)

Copy Markdown View Source

Fetch ExFPL manager (entry) data.

get/2, history/2 and picks/3 are public endpoints. me/1 and my_team/2 are authenticated and require an ExFPL.Session.

Summary

Functions

Fetch a manager's profile (/entry/{team_id}/).

Fetch a manager's history (/entry/{team_id}/history/).

Fetch information about the authenticated user (/me/).

Fetch the authenticated user's current team (/my-team/{team_id}/).

Fetch a manager's picks for a gameweek (/entry/{team_id}/event/{gw}/picks/).

Functions

get(team_id, opts \\ [])

@spec get(
  integer(),
  keyword()
) :: {:ok, ExFPL.Entry.t() | map()} | {:error, term()}

Fetch a manager's profile (/entry/{team_id}/).

history(team_id, opts \\ [])

@spec history(
  integer(),
  keyword()
) :: {:ok, ExFPL.EntryHistory.t() | map()} | {:error, term()}

Fetch a manager's history (/entry/{team_id}/history/).

me(opts)

@spec me(keyword()) :: {:ok, ExFPL.Me.t() | map()} | {:error, term()}

Fetch information about the authenticated user (/me/).

Requires session: %ExFPL.Session{} in opts.

my_team(team_id, opts)

@spec my_team(
  integer(),
  keyword()
) :: {:ok, ExFPL.MyTeam.t() | map()} | {:error, term()}

Fetch the authenticated user's current team (/my-team/{team_id}/).

Requires session: %ExFPL.Session{} in opts.

picks(team_id, gameweek, opts \\ [])

@spec picks(integer(), integer(), keyword()) ::
  {:ok, ExFPL.Picks.t() | map()} | {:error, term()}

Fetch a manager's picks for a gameweek (/entry/{team_id}/event/{gw}/picks/).