Skip to content

iter_search_things async

iter_search_things(
    entity_id: Urn,
    *,
    config_overrides: Optional[AsyncIoTThingsGraphClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    namespace_version: Optional[Version] = None,
) -> AsyncIterator[Thing]
Source code in docs_src/capo_iotthingsgraph/_services/async_io_t_things_graph.py
async def iter_search_things(
    self,
    entity_id: "capo_iotthingsgraph.types.urn.Urn",
    *,
    config_overrides: Optional[AsyncIoTThingsGraphClientConfig] = None,
    next_token: Optional["capo_iotthingsgraph.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_iotthingsgraph.types.max_results.MaxResults"
    ] = None,
    namespace_version: Optional["capo_iotthingsgraph.types.version.Version"] = None,
) -> "AsyncIterator[capo_iotthingsgraph.types.thing.Thing]":
    _token = next_token
    while True:
        _response = await self.search_things(
            entity_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            namespace_version=namespace_version,
        )
        _page = _resolve_path(_response, ("things",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break