Skip to content

iter_list_scripts async

iter_list_scripts(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    limit: Optional[PositiveInteger] = None,
    next_token: Optional[NonEmptyString] = None,
) -> AsyncIterator[Script]
Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def iter_list_scripts(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    limit: Optional["capo_gamelift.types.positive_integer.PositiveInteger"] = None,
    next_token: Optional[
        "capo_gamelift.types.non_empty_string.NonEmptyString"
    ] = None,
) -> "AsyncIterator[capo_gamelift.types.script.Script]":
    _token = next_token
    while True:
        _response = await self.list_scripts(
            config_overrides=config_overrides,
            limit=limit,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("scripts",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break