# `ExFPL.Session`
[🔗](https://github.com/sgerrand/ex_fpl/blob/main/lib/ex_fpl/session.ex#L1)

Authenticated session for ExFPL API calls.

The Fantasy Premier League site authenticates requests via cookies set after
a browser login. This library does not implement the login flow itself —
callers obtain the cookie value (typically `pl_profile`) from a logged-in
browser and construct a session struct manually:

    session = ExFPL.Session.new(cookie: "pl_profile=...; sessionid=...")
    ExFPL.Entries.me(session: session)

Functions that target authenticated endpoints (`ExFPL.Entries.me/1`,
`ExFPL.Entries.my_team/2`) require a session.

# `t`

```elixir
@type t() :: %ExFPL.Session{cookie: String.t()}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

Build a session from a cookie string copied from a logged-in browser.

## Examples

    iex> ExFPL.Session.new(cookie: "pl_profile=abc")
    %ExFPL.Session{cookie: "pl_profile=abc"}

---

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