ExFPL.Leagues.H2H (ExFPL v0.1.0)

Copy Markdown View Source

Fetch head-to-head league data.

Standings come from /leagues-h2h/{league_id}/standings/ and per-gameweek matches from /leagues-h2h-matches/league/{league_id}/.

Summary

Functions

Fetch H2H matches for a league.

Fetch one page of H2H league standings.

Functions

matches(league_id, opts \\ [])

@spec matches(
  integer(),
  keyword()
) :: {:ok, [ExFPL.H2HMatch.t()] | map()} | {:error, term()}

Fetch H2H matches for a league.

Pass event: gw to restrict to a gameweek and page: N to paginate. Pass raw: true to receive the raw map.

standings(league_id, opts \\ [])

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

Fetch one page of H2H league standings.

Pass page: N to paginate. Pass raw: true to receive the raw map.