Skip to content

objective#

zen_api_utils.objective #

Functions:

get_objective_by_position #

get_objective_by_position(objectives: ObjectiveChangerServiceGetObjectivesResponse, position: int) -> ObjectiveData | None

Return the objective that matches the given position from the objectives list. Args: objectives (ObjectiveChangerServiceGetObjectivesResponse): An object containing a list of objectives. position (int): The position of the objective to retrieve. Returns: ObjectiveData | None: The objective at the specified position if found, otherwise None.

get_optovar_by_position #

get_optovar_by_position(optovars: OptovarServiceGetOptovarsResponse, position: int) -> OptovarData | None

Return the optovar that matches the given position from the objectives list. Args: objectives (OptovarServiceGetOptovarsResponse): An object containing a list of optovars. position (int): The position of the optovar to retrieve. Returns: OptovarData | None: The optovar at the specified position if found, otherwise None.

get_used_objective_positions #

get_used_objective_positions(objectives: ObjectiveChangerServiceGetObjectivesResponse) -> list[int]

Generates a list of used objective positions from a collection of objective data. Args: objectives (ObjectiveChangerServiceGetObjectivesResponse): An object containing a list of objectives with their respective positions. Returns: List[int]: A list of all positions currently in use by the objectives.

get_used_optovar_positions #

get_used_optovar_positions(optovars: OptovarServiceGetOptovarsResponse) -> list[int]

Generates a list of used optovar positions from a collection of optovar data. Args: objectives (OptovarServiceGetOptovarsResponse): An object containing a list of optovars with their respective positions. Returns: List[int]: A list of all positions currently in use by the optovars.