Polar::PaginatedIterator(T)
Inherits Iterator < Enumerable < Reference < Object
Lazy iterator for paginated API responses
Automatically fetches pages as needed, yielding items one at a time.
Implements Crystal's Iterator(T) protocol for full iterator support.
@param T The type of items being iterated
Constants
Log = ::Log.for(self)
Constructors
Instance methods
next
Returns the next item in the iteration
Automatically fetches the next page when the current page is exhausted.
Returns Iterator::Stop when all pages have been consumed.
@return The next item or Iterator::Stop
rewind
Rewinds the iterator to the beginning
This will cause the iterator to start fetching from page 1 again.