Skip to content

iter_list_conversations async

iter_list_conversations(
    application_id: ApplicationId,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    user_id: Optional[UserId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResultsIntegerForListConversations] = None,
) -> AsyncIterator[Conversation]
Source code in docs_src/capo_qbusiness/_services/async_q_business.py
async def iter_list_conversations(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    user_id: Optional["capo_qbusiness.types.user_id.UserId"] = None,
    next_token: Optional["capo_qbusiness.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_qbusiness.types.max_results_integer_for_list_conversations.MaxResultsIntegerForListConversations"
    ] = None,
) -> "AsyncIterator[capo_qbusiness.types.conversation.Conversation]":
    _token = next_token
    while True:
        _response = await self.list_conversations(
            application_id,
            config_overrides=config_overrides,
            user_id=user_id,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("conversations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break