Overview
The league settings endpoint fetches comprehensive configuration data for your Yahoo Fantasy Basketball league, including scoring settings, roster positions, stat categories, and league rules.Authentication
Requires an active user session with a selected league.Request
This endpoint does not accept any query parameters. It automatically uses the league selected in the user’s session.Response
The root object containing all league settings from Yahoo Fantasy API
Error Responses
Error message describing what went wrong
Possible Errors
-
400 Bad Request - No league selected in session
-
500 Internal Server Error - Failed to fetch settings from Yahoo API
Example Request
Implementation Details
This endpoint is implemented inmain.py:492-500 and performs the following:
- Validates that a league is selected in the user’s session
- Calls the Yahoo Fantasy API:
fantasy/v2/league/{league_key}/settings - Logs successful retrieval or error details
- Returns the complete Yahoo API response as JSON
- Returns a 500 error with exception details if the Yahoo API call fails
Use Cases
- Display league rules and configuration to users
- Determine scoring categories for analysis
- Extract roster position requirements
- Identify playoff structure and timing
- Validate league type (head-to-head, rotisserie, etc.)
Related Endpoints
- Season Averages - Uses scoring categories from settings
- Draft Keepers - May reference league settings for keeper rules