gamesheet_sdk.admin.roster.helpers module¶
Shared helper functions for roster operations.
- gamesheet_sdk.admin.roster.helpers.get_team_for_roster_update(session, season_id, team_id)[source]¶
Fetch team data for roster update.
- Parameters:
- Returns:
Dictionary containing the full team JSON:API response with data, attributes, and relationships.
- Return type:
- Raises:
AuthenticationError – If the server returns 401.
GameSheetError – For any other non-2xx response.
- gamesheet_sdk.admin.roster.helpers.update_team_roster(session, season_id, team_id, roster, current_attrs, current_relationships)[source]¶
Update team’s roster via PATCH to teams-v2 endpoint.
- Parameters:
session (Session) – An authenticated
Session.season_id (str) – The season identifier.
team_id (str) – The team identifier.
roster (dict[str, Any]) – The updated roster dict containing players and coaches arrays.
current_attrs (dict[str, Any]) – Current team attributes to preserve unchanged fields.
current_relationships (dict[str, Any]) – Current team relationships to preserve.
- Raises:
AuthenticationError – If the server returns 401.
GameSheetError – For any other non-2xx response.