gamesheet_sdk.admin.roster.coaches module¶
Coach roster operations.
- gamesheet_sdk.admin.roster.coaches.get_coach(session, season_id, coach_id)[source]¶
Get a single coach by ID.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The parent season identifier. :type season_id: str :param coach_id: The coach identifier to retrieve. :type coach_id: str :returns: Return value. :rtype: Coach- Return type:
- gamesheet_sdk.admin.roster.coaches.list_coaches(session, season_id)[source]¶
Return every coach in the specified season.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier whose coaches to list. :type season_id: str :returns: A list ofCoach, in the order the server returned them. The list may be empty if theseason has no coaches.
- gamesheet_sdk.admin.roster.coaches.create_coach(session, season_id, first_name, last_name, *, external_id=None, position=None, team_id=None)[source]¶
Create a new coach in the specified season.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier to create the coach in. :type season_id: str :param first_name: Coach’s first name. :type first_name: str :param last_name: Coach’s last name. :type last_name: str :param external_id: Optional external identifier for the coach. :type external_id: str | None :param position: Optional position (Head Coach, Assistant Coach, etc.). :type position: str | None :param team_id: Optional team identifier to associate the coach with. :type team_id: str | None :returns: Return value. :rtype: Coach- Return type:
- gamesheet_sdk.admin.roster.coaches.update_coach(session, season_id, coach_id, *, first_name=None, last_name=None, external_id=None, position=None)[source]¶
Update an existing coach in the specified season.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. At least one field must be provided for update. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier containing the coach. :type season_id: str :param coach_id: The coach identifier to update. :type coach_id: str :param first_name: Optional updated first name. :type first_name: str | None :param last_name: Optional updated last name. :type last_name: str | None :param external_id: Optional updated external identifier. :type external_id: str | None :param position: Optional updated position. :type position: str | None :returns: The updatedCoach. :rtype: Coach :raises ValueError: If no fields are provided for update.- Return type:
- gamesheet_sdk.admin.roster.coaches.list_team_coaches(session, season_id, team_id)[source]¶
Return every coach for the specified team.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier whose coaches to list. :type team_id: str :returns: A list ofCoach, in the order the server returned them. The list may be empty if theteam has no coaches.
- gamesheet_sdk.admin.roster.coaches.get_team_coach(session, season_id, team_id, coach_id)[source]¶
Get a single coach from a team’s roster.
This function retrieves team roster metadata (position, status, signature) that is only available in the team context, unlike
get_coach()which fetches from the season-level coaches endpoint without roster metadata. The suppliedSessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier. :type team_id: str :param coach_id: The coach identifier to retrieve. :type coach_id: str :returns: TheCoachwith team roster metadata populated. :rtype: Coach :raises GameSheetError: If the coach is not found on the team’s roster.- Return type:
- gamesheet_sdk.admin.roster.coaches.create_team_coach(session, season_id, team_id, first_name, last_name, *, external_id=None, position=None)[source]¶
Create a new coach and add to the specified team’s roster.
This function performs two operations: (1) creates the coach at the season level, (2) updates the team’s roster to include the new coach with position and other metadata. The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier to add the coach to. :type team_id: str :param first_name: Coach’s first name. :type first_name: str :param last_name: Coach’s last name. :type last_name: str :param external_id: Optional external identifier for the coach. :type external_id: str | None :param position: Optional position (Head Coach, Assistant Coach, etc.). :type position: str | None :returns: Return value. :rtype: Coach- Return type:
- gamesheet_sdk.admin.roster.coaches.update_team_coach(session, season_id, team_id, coach_id, *, first_name=None, last_name=None, external_id=None, position=None)[source]¶
Update a coach and update the team’s roster in one operation.
This function performs two operations: (1) updates the coach at the season level, (2) updates the team’s roster with any position changes. The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier. :type team_id: str :param coach_id: The coach identifier to update. :type coach_id: str :param first_name: Optional updated first name. :type first_name: str | None :param last_name: Optional updated last name. :type last_name: str | None :param external_id: Optional updated external identifier. :type external_id: str | None :param position: Optional updated position. :type position: str | None :returns: The updatedCoach. :rtype: Coach :raises ValueError: If no fields are provided for update.- Return type:
- gamesheet_sdk.admin.roster.coaches.delete_coach(session, season_id, coach_id)[source]¶
Delete a coach from the specified season.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier containing the coach. :type season_id: str :param coach_id: The coach identifier to delete. :type coach_id: str
- gamesheet_sdk.admin.roster.coaches.unassign_coach(session, season_id, coach_id, team_id)[source]¶
Unassign a coach from a team’s roster.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param coach_id: The coach identifier to unassign. :type coach_id: str :param team_id: The team identifier to unassign the coach from. :type team_id: str :raises GameSheetError: If the coach is not assigned to the team.
- gamesheet_sdk.admin.roster.coaches.delete_team_coach(session, season_id, team_id, coach_id)[source]¶
Delete a coach from a team’s roster and the season.
This function performs two operations: (1) removes the coach from the team’s roster, (2) deletes the coach at the season level. The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier. :type team_id: str :param coach_id: The coach identifier to delete. :type coach_id: str
- gamesheet_sdk.admin.roster.coaches.assign_coach(session, season_id, coach_id, team_id, *, position=None)[source]¶
Assign an existing coach to a team’s roster.
The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param coach_id: The coach identifier to assign. :type coach_id: str :param team_id: The team identifier to assign the coach to. :type team_id: str :param position: Optional position (Head Coach, Assistant Coach, etc.). :type position: str | None :returns: TheCoachwith roster metadata populated. :rtype: Coach :raises GameSheetError: If the coach is already assigned to the team.- Return type:
- gamesheet_sdk.admin.roster.coaches.assign_team_coach(session, season_id, team_id, coach_id, *, position=None)[source]¶
Assign an existing coach to a team’s roster (team-scoped alias).
This is an alias for
assign_coach()provided for consistency with the team-scoped command structure. The suppliedSessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier to assign the coach to. :type team_id: str :param coach_id: The coach identifier to assign. :type coach_id: str :param position: Optional position (Head Coach, Assistant Coach, etc.). :type position: str | None :returns: Return value. :rtype: Coach- Return type:
- gamesheet_sdk.admin.roster.coaches.unassign_team_coach(session, season_id, team_id, coach_id)[source]¶
Unassign a coach from a team’s roster (team-scoped alias).
This is an alias for
unassign_coach()provided for consistency with the team-scoped command structure. The suppliedSessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param team_id: The team identifier to unassign the coach from. :type team_id: str :param coach_id: The coach identifier to unassign. :type coach_id: str
- gamesheet_sdk.admin.roster.coaches.get_coach_penalty_report(session, season_id, coach_id)[source]¶
Fetch penalty report for a coach.
First retrieves the coach to get their external_id, then fetches the penalty report from the BFF API. The supplied
Sessionmust already carry a bearer token (e.g. viaSession.set_bearer_token()); the call is otherwise unauthenticated and will 401. :param session: An authenticatedSession. :type session: Session :param season_id: The season identifier. :type season_id: str :param coach_id: The coach identifier. :type coach_id: str :returns: Penalty report data including coach_games, coach_penalties, rostered_coaches, andseason_coaches.