# `ExFPL.Leagues.H2H`
[🔗](https://github.com/sgerrand/ex_fpl/blob/main/lib/ex_fpl/leagues/h2h.ex#L1)

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}/`.

# `matches`

```elixir
@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`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
