pub struct RecentTracksIterator<C: LastFmEditClient> { /* private fields */ }Expand description
Iterator for browsing a user’s recent tracks/scrobbles.
This iterator provides access to the user’s recent listening history with timestamps, which is essential for finding tracks that can be edited. It supports optional timestamp-based filtering to avoid reprocessing old data.
Implementations§
Source§impl<C: LastFmEditClient> RecentTracksIterator<C>
impl<C: LastFmEditClient> RecentTracksIterator<C>
Sourcepub fn new(client: C) -> Self
pub fn new(client: C) -> Self
Create a new recent tracks iterator starting from page 1.
This is typically called via LastFmEditClient::recent_tracks.
Sourcepub fn with_starting_page(client: C, starting_page: u32) -> Self
pub fn with_starting_page(client: C, starting_page: u32) -> Self
Create a new recent tracks iterator starting from a specific page.
This allows resuming pagination from an arbitrary page, useful for continuing from where a previous iteration left off.
§Arguments
client- The LastFmEditClient to use for API callsstarting_page- The page number to start from (1-indexed)
Sourcepub fn with_stop_timestamp(self, timestamp: u64) -> Self
pub fn with_stop_timestamp(self, timestamp: u64) -> Self
Set a timestamp to stop iteration at.
When this is set, the iterator will stop returning tracks once it encounters a track with a timestamp less than or equal to the specified value. This is useful for incremental processing to avoid reprocessing old data.
§Arguments
timestamp- Unix timestamp to stop at