Save Settings
save_settingsSave ESPN credentials and league ID, then verify them against ESPN to confirm setup and return league, team, and season details.
Instructions
Save ESPN credentials and league id, then verify them against ESPN.
Normally called by the setup card's Save & test button; you may call it
directly if the user pasted values into the chat. Returns {"ok": true,
"league_name", "team_name", "season"} on success, or {"ok": false,
"error": "..."} with a message to relay. Values are stored in a per-user
config file that takes precedence over the extension's settings form.
Values are written to the config file before the ESPN check, so on an
ok: false cookie error they are already saved (tell the user to
re-copy espn_s2/SWID); on a validation error nothing is written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| swid | No | ||
| espn_s2 | No | ||
| league_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||