Mixins¶
griddy / nfl / endpoints / pro / mixins**
Game-related mixin classes for Pro API endpoints.
Module Contents¶
Game-related mixin classes for Pro API endpoints.
Classes¶
GameContentMixin
¶
Mixin for game content-related endpoints.
Functions¶
get_game_preview
¶
get_game_preview(
*,
season: int,
season_type: SeasonTypeEnum,
week: int,
visitor_display_name: str,
home_display_name: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> GamePreviewResponse
Get Game Preview Content
Retrieves preview content and insights for a specific game based on teams and week. Returns preview information, matchup analysis, and key storylines.
:param season: Season year :param season_type: Type of season :param week: Week number :param visitor_display_name: Visiting team display name :param home_display_name: Home team display name :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_content.py
get_game_preview_async
async
¶
get_game_preview_async(
*,
season: int,
season_type: SeasonTypeEnum,
week: int,
visitor_display_name: str,
home_display_name: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> GamePreviewResponse
Get Game Preview Content
Retrieves preview content and insights for a specific game based on teams and week. Returns preview information, matchup analysis, and key storylines.
:param season: Season year :param season_type: Type of season :param week: Week number :param visitor_display_name: Visiting team display name :param home_display_name: Home team display name :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_content.py
get_game_insights
¶
get_game_insights(
*,
season: int,
fapi_game_id: str,
away_team_id: str,
home_team_id: str,
limit: Optional[int] = 20,
tags: Optional[str] = None,
exclude_tags: Optional[str] = None,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> List[GameInsight]
Get Game-Specific Insights
Retrieves analytical insights and advanced statistics for a specific game. Can filter by tags and exclude specific content types.
:param season: Season year :param fapi_game_id: FAPI Game identifier (UUID) :param away_team_id: Away team identifier :param home_team_id: Home team identifier :param limit: Maximum number of insights to return :param tags: Comma-separated list of tags to filter by :param exclude_tags: Comma-separated list of tags to exclude :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_content.py
get_game_insights_async
async
¶
get_game_insights_async(
*,
season: int,
fapi_game_id: str,
away_team_id: str,
home_team_id: str,
limit: Optional[int] = 20,
tags: Optional[str] = None,
exclude_tags: Optional[str] = None,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> List[GameInsight]
Get Game-Specific Insights
Retrieves analytical insights and advanced statistics for a specific game. Can filter by tags and exclude specific content types.
:param season: Season year :param fapi_game_id: FAPI Game identifier (UUID) :param away_team_id: Away team identifier :param home_team_id: Home team identifier :param limit: Maximum number of insights to return :param tags: Comma-separated list of tags to filter by :param exclude_tags: Comma-separated list of tags to exclude :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_content.py
GameResultsDataMixin
¶
Mixin for game results and play data endpoints.
Functions¶
get_stats_boxscore
¶
get_stats_boxscore(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> BoxscoreResponse
Get Game Boxscore (Stats API)
Retrieves comprehensive boxscore data for a specific game including team statistics, individual player statistics, and scoring summary. Returns empty arrays for future games.
:param game_id: Game identifier (10-digit format YYYYMMDDNN) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_playlist
¶
get_playlist(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> PlaylistResponse
:param game_id: Game identifier(s) in 10-digit format (YYYYMMDDNN). Can be a single game ID or multiple game IDs for batch retrieval. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_summary_play
¶
get_summary_play(
*,
game_id: str,
play_id: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> PlaySummaryResponse
Get Play Summary
Retrieves detailed information about a specific play in a game including play description, statistics, involved players, win probability, and expected points.
:param game_id: Game identifier (UUID format) :param play_id: Play identifier within the game :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_summary_play_async
async
¶
get_summary_play_async(
*,
game_id: str,
play_id: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> PlaySummaryResponse
Get Play Summary
Retrieves detailed information about a specific play in a game including play description, statistics, involved players, win probability, and expected points.
:param game_id: Game identifier (UUID format) :param play_id: Play identifier within the game :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_plays_win_probability
¶
get_plays_win_probability(
*,
game_id: Union[GameID, GameIDTypedDict],
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> PlayWinProbabilityResponse
Get Game Win Probability by Plays
Retrieves comprehensive win probability data for every play in specified games. Returns pre-game win probabilities and detailed play-by-play probability changes, including Win Probability Added (WPA) metrics for each play. This advanced analytics endpoint tracks how each play impacts the probability of each team winning the game. Supports querying multiple games simultaneously.
:param game_id: Game identifier(s) in 10-digit format (YYYYMMDDNN). Can be a single game ID or multiple game IDs for batch retrieval. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_plays_win_probability_async
async
¶
get_plays_win_probability_async(
*,
game_id: Union[GameID, GameIDTypedDict],
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> PlayWinProbabilityResponse
Get Game Win Probability by Plays
Retrieves comprehensive win probability data for every play in specified games. Returns pre-game win probabilities and detailed play-by-play probability changes, including Win Probability Added (WPA) metrics for each play. This advanced analytics endpoint tracks how each play impacts the probability of each team winning the game. Supports querying multiple games simultaneously.
:param game_id: Game identifier(s) in 10-digit format (YYYYMMDDNN). Can be a single game ID or multiple game IDs for batch retrieval. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_win_probability_min
¶
get_win_probability_min(
*,
fapi_game_id: List[str],
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> WinProbabilityResponse
Get Minimal Win Probability Data
Retrieves minimal win probability data for specified games, including pregame win probabilities and play-by-play probability changes throughout the game. This endpoint provides essential win probability metrics with optimized data structure for performance. Supports multiple games in a single request.
:param fapi_game_id: Football API game identifiers (UUID format). Supports multiple game IDs to retrieve win probability data for multiple games simultaneously. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
get_win_probability_min_async
async
¶
get_win_probability_min_async(
*,
fapi_game_id: List[str],
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> WinProbabilityResponse
Get Minimal Win Probability Data
Retrieves minimal win probability data for specified games, including pregame win probabilities and play-by-play probability changes throughout the game. This endpoint provides essential win probability metrics with optimized data structure for performance. Supports multiple games in a single request.
:param fapi_game_id: Football API game identifiers (UUID format). Supports multiple game IDs to retrieve win probability data for multiple games simultaneously. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_results.py
GameScheduleMixin
¶
Mixin for game schedule-related endpoints.
These methods are designed to be mixed into classes that inherit from ProSDK/BaseSDK, which provides the helper methods (_resolve_base_url, _resolve_timeout, etc.).
Functions¶
get_scheduled_game
¶
get_scheduled_game(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> GameDetail
Get Single Game Details
Retrieves detailed information for a specific game by its ID. Returns comprehensive game data including teams, score, venue, broadcast information, and current game status.
:param game_id: Game identifier (UUID format) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_scheduled_game_async
async
¶
get_scheduled_game_async(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> GameDetail
Get Single Game Details
Retrieves detailed information for a specific game by its ID. Returns comprehensive game data including teams, score, venue, broadcast information, and current game status.
:param game_id: Game identifier (UUID format) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_game_matchup_rankings
¶
get_game_matchup_rankings(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> MatchupRankingsResponse
Get Game Matchup Rankings
Retrieves comprehensive matchup rankings and statistical comparisons for both teams in a specific game. Returns offensive, defensive, and special teams rankings with Z-scores and advantage ratings for various statistical categories.
:param game_id: Game identifier (10-digit format YYYYMMDDNN) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_game_matchup_rankings_async
async
¶
get_game_matchup_rankings_async(
*,
game_id: str,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> MatchupRankingsResponse
Get Game Matchup Rankings
Retrieves comprehensive matchup rankings and statistical comparisons for both teams in a specific game. Returns offensive, defensive, and special teams rankings with Z-scores and advantage ratings for various statistical categories.
:param game_id: Game identifier (10-digit format YYYYMMDDNN) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_game_team_rankings
¶
get_game_team_rankings(
*,
season: int,
season_type: SeasonTypeEnum,
away_team_id: str,
home_team_id: str,
week: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> TeamRankingsResponse
Get Team Rankings for Game
Retrieves comprehensive statistical rankings for both teams in a specific game. Returns 300+ statistical categories with rankings for offensive, defensive, and special teams performance.
:param season: Season year :param season_type: Type of season :param away_team_id: Away team UUID :param home_team_id: Home team UUID :param week: Week number :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_game_team_rankings_async
async
¶
get_game_team_rankings_async(
*,
season: int,
season_type: SeasonTypeEnum,
away_team_id: str,
home_team_id: str,
week: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> TeamRankingsResponse
Get Team Rankings for Game
Retrieves comprehensive statistical rankings for both teams in a specific game. Returns 300+ statistical categories with rankings for offensive, defensive, and special teams performance.
:param season: Season year :param season_type: Type of season :param away_team_id: Away team UUID :param home_team_id: Home team UUID :param week: Week number :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_team_injuries
¶
get_team_injuries(
*,
season: int,
season_type: SeasonTypeEnum,
team_id: str,
week: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> InjuryReportResponse
Get Team Injuries for Game Week
Retrieves injury report information for a specific team in a given week. Returns player injury status and details for the specified team and week.
:param season: Season year :param season_type: Type of season :param team_id: Team identifier (UUID format) :param week: Week number within the season :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.
Source code in griddy/nfl/endpoints/pro/mixins/game_schedule.py
get_team_injuries_async
async
¶
get_team_injuries_async(
*,
season: int,
season_type: SeasonTypeEnum,
team_id: str,
week: int,
retries: OptionalNullable[RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None
) -> InjuryReportResponse
Get Team Injuries for Game Week
Retrieves injury report information for a specific team in a given week. Returns player injury status and details for the specified team and week.
:param season: Season year :param season_type: Type of season :param team_id: Team identifier (UUID format) :param week: Week number within the season :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.