Skip to content

iter_list_comments async

iter_list_comments(
    case_id: CaseId,
    *,
    config_overrides: Optional[AsyncSecurityIRClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> AsyncIterator[ListCommentsItem]
Source code in docs_src/capo_security_ir/_services/async_security_ir.py
async def iter_list_comments(
    self,
    case_id: "capo_security_ir.types.case_id.CaseId",
    *,
    config_overrides: Optional[AsyncSecurityIRClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> "AsyncIterator[capo_security_ir.types.list_comments_item.ListCommentsItem]":
    _token = next_token
    while True:
        _response = await self.list_comments(
            case_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break