← Back to Main Documentation

Complete API Reference

HS Scraper Toolkit API

MaxPrepRoster Class

Purpose: Scrapes roster data from MaxPreps team pages

Constructor

MaxPrepRoster(url: str)

Parameters:

  • url (str): The base URL for the MaxPreps team page (e.g., "https://www.maxpreps.com/il/chicago/northside-mustangs")

scrape() Method

scrape(sports=None, genders=None, seasons=None, levels=None) → pd.DataFrame

Parameters:

  • sports (list, optional): Sports to scrape. If None, scrapes all available sports
  • genders (list, optional): Genders to scrape ["boys", "girls"]. Default: both
  • seasons (list, optional): Seasons to scrape ["fall", "winter", "spring"]. Default: all
  • levels (list, optional): Competition levels ["varsity", "jv", "freshman"]. Default: all

Returns: pandas DataFrame with columns:

  • name: Athlete name
  • number: Jersey number
  • sport: Sport type
  • season: Season (fall/winter/spring)
  • level: Competition level (varsity/jv/freshman)
  • gender: Gender (boys/girls)
  • grade: Grade level (9/10/11/12)
  • position: Player position

AthleticNetTrackField Class

Purpose: Scrapes track & field and cross country data from Athletic.net using Selenium WebDriver

Requirements: ChromeDriver must be installed and accessible in PATH

Constructor

AthleticNetTrackField(url: str)

Parameters:

  • url (str): The base URL for the Athletic.net team page (e.g., "https://www.athletic.net/team/19718")

scrape_athletes() Method

scrape_athletes(sports=['cross-country', 'track-and-field-outdoor', 'track-and-field-indoor']) → pd.DataFrame

Parameters:

  • sports (list): List of sports to scrape athlete data for

Returns: pandas DataFrame with athlete information

Note: Jersey numbers are always 0 for Athletic.net data

scrape_events() Method

scrape_events(sports=['cross-country', 'track-and-field-outdoor', 'track-and-field-indoor'], years=[current_year, current_year + 1]) → pd.DataFrame

Parameters:

  • sports (list): List of sports to scrape
  • years (list): List of years to scrape data for

Returns: pandas DataFrame with event schedule information

Performance Note: May take several minutes due to Selenium automation

Frontend Package API

SharedHeader Widget

SharedHeader({required String title, VoidCallback? onTrailingTap})

Purpose: Customizable header with title and optional trailing action button

Properties:

ArticleDetailSheet Widget

ArticleDetailSheet({required Article article, ScrollController? scrollController, Function(String)? onLinkError})

Purpose: Displays article content with markdown link support in a draggable sheet

Properties:

LoginSheet Widget

LoginSheet({VoidCallback? onLogin})

Purpose: Login form with email/password fields and custom styling

Properties:

WebViewSheet Widget

WebViewSheet({required String url, Function(String)? onError})

Purpose: Embedded web view with external browser option

Properties:

TextHelper Utility Class

Purpose: Responsive text utilities for different screen sizes

getFontSizeMultiplier()

static double getFontSizeMultiplier(BuildContext context, {double defaultMultiplier = 0.045, double narrowScreenMultiplier = 0.04})

Returns appropriate font size multiplier based on screen width

responsiveText()

static Widget responsiveText(String text, {required BuildContext context, bool isBold = false, bool isTitle = false, Color? color, int maxLines = 1, TextAlign textAlign = TextAlign.start, double? customSizeMultiplier})

Creates responsive text widget that handles overflow and adjusts size

fittedText()

static Widget fittedText(String text, {required BuildContext context, bool isBold = false, Color? color, double? customSizeMultiplier})

Creates FittedBox text that scales to fit container

DesignConstants Utility Class

Purpose: Consistent spacing, radius, and shadow constants

Radius Methods

  • getResponsiveRadius(BuildContext context, double baseRadius)
  • get24Radius(BuildContext context) - Regular card radius
  • get32Radius(BuildContext context) - Carousel card radius
  • get20Radius(BuildContext context) - Small card radius
  • get16Radius(BuildContext context) - Button radius
  • get10Radius(BuildContext context) - Small button radius

Shadow Constants

  • standardShadow - Default iOS-style shadow
  • lightShadow - Lighter shadow variant
  • bulletinShadow - Specific shadow for bulletin items

AppTheme Class

Purpose: Customizable theme system for school branding

buildTheme()

static ThemeData buildTheme({required Color primaryColor, required Color secondaryColor, required Color backgroundColor})

Builds a complete Flutter theme with custom school colors

Utility Methods

  • isNarrowScreen(BuildContext context) - Detects narrow screens like Samsung Galaxy S9
  • getResponsiveSize(BuildContext context, double size) - Adjusts sizes for narrow screens
  • responsivePadding(BuildContext context, double defaultPadding) - Responsive padding