Skip to main content

Overview

The scoreboard endpoint fetches matchup data for a specific week in your Yahoo Fantasy Basketball league. This includes head-to-head matchup information, scores, and team performance for the requested week.

Authentication

Requires an active user session with a selected league.

Request

week
integer
required
The week number for which to retrieve scoreboard data. Must be a valid week number for the current fantasy season.

Response

fantasy_content
object
The root object containing all scoreboard data from Yahoo Fantasy API

Error Responses

error
string
Error message describing what went wrong

Possible Errors

  • 400 Bad Request - Missing or invalid week parameter
    {"error": "week param required"}
    
  • 400 Bad Request - No league selected in session
    {"error": "no league chosen"}
    

Example Request

curl -X GET "https://your-domain.com/api/scoreboard?week=5" \
  -H "Cookie: session=your-session-cookie"

Implementation Details

This endpoint is implemented in main.py:475-479 and performs the following:
  1. Validates that a league is selected in the user’s session
  2. Validates that the week parameter is provided and is an integer
  3. Calls the Yahoo Fantasy API: fantasy/v2/league/{league_key}/scoreboard;week={week}
  4. Returns the complete Yahoo API response as JSON

Build docs developers (and LLMs) love