gamesheet_sdk.admin.cli.shared.game_runner module

Admin-side execution of the unified game option set.

The gamesheet-admin games commands are thin: they declare the shared option set from gamesheet_sdk.common.cli.game_options and hand their collected parameters here, which translates them into the season-schedule JSON:API calls in gamesheet_sdk.admin.games.

gamesheet_sdk.admin.cli.shared.game_runner.resolve_season_id(ctx, season_id)[source]

Resolve the season from the sub-command’s own option or the games group’s.

--season-id is accepted in both positions so that a command line written for gamesheet-teams schedule games, which only has the sub-command spelling, runs unchanged here.

Parameters:
  • ctx (Context) – Click context object.

  • season_id (str | None) – The sub-command’s --season-id, if given.

Returns:

str – The season identifier.

Raises:

UsageError – If neither position supplied one.

Return type:

str

gamesheet_sdk.admin.cli.shared.game_runner.run_create(ctx, params)[source]

Create a scheduled game from the unified option set.

Parameters:
  • ctx (Context) – Click context object.

  • params (dict[str, Any]) – The command’s collected parameters.

gamesheet_sdk.admin.cli.shared.game_runner.run_delete(ctx, params)[source]

Delete a scheduled game and report the outcome.

Parameters:
  • ctx (Context) – Click context object.

  • params (dict[str, Any]) – The command’s collected parameters.

gamesheet_sdk.admin.cli.shared.game_runner.run_get(ctx, params)[source]

Show one scheduled game.

Parameters:
  • ctx (Context) – Click context object.

  • params (dict[str, Any]) – The command’s collected parameters.

gamesheet_sdk.admin.cli.shared.game_runner.run_list(ctx, params)[source]

List the season’s scheduled games.

Parameters:
  • ctx (Context) – Click context object.

  • params (dict[str, Any]) – The command’s collected parameters.

gamesheet_sdk.admin.cli.shared.game_runner.run_update(ctx, params)[source]

Update a scheduled game from the unified option set.

Unspecified fields keep the values the API currently holds.

Parameters:
  • ctx (Context) – Click context object.

  • params (dict[str, Any]) – The command’s collected parameters.