listAllResources method

Stream<Resource> listAllResources({
  1. ListResourcesRequest? request,
  2. int? maxPageCount = 64,
})

Every Resource on this server, walking resources/list pages until one reports no nextCursor.

request asks for the first page, and each later page repeats it with the next cursor. maxPageCount bounds the walk, throwing past it; null lifts the bound.

Implementation

Stream<Resource> listAllResources({
  ListResourcesRequest? request,
  int? maxPageCount = 64,
}) => _listAllPages(
  ListResourcesRequest.methodName,
  request ?? ListResourcesRequest(),
  (ListResourcesResult page) => page.resources,
  maxPageCount,
);