Skip to main content
Pages for you and yields assets one at a time.

Parameters

The same as listMedia(), minus page — it’s managed for you.

Returns

An AsyncGenerator of media items, each identical to a listMedia() entry.

Lazy by design

The next page is requested only when you ask for the item after the last one yielded, so breaking out of the loop stops the requests too:
Raising limit trades memory for fewer round trips on large projects: