ExFPL.Session (ExFPL v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

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

Types

t()

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

Functions

new(opts)

@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"}