Struct LastFmEditClientImpl

Source
pub struct LastFmEditClientImpl { /* private fields */ }

Implementations§

Source§

impl LastFmEditClientImpl

Source

pub fn from_session( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, ) -> Self

Source

pub fn from_session_with_rate_limit_patterns( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, rate_limit_patterns: Vec<String>, ) -> Self

Source

pub async fn login_with_credentials( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, ) -> Result<Self>

Source

pub fn from_session_with_client_config( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, config: ClientConfig, ) -> Self

Source

pub async fn login_with_credentials_and_client_config( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, config: ClientConfig, ) -> Result<Self>

Source

pub fn from_session_with_config( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, retry_config: RetryConfig, rate_limit_config: RateLimitConfig, ) -> Self

Source

pub async fn login_with_credentials_and_config( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, retry_config: RetryConfig, rate_limit_config: RateLimitConfig, ) -> Result<Self>

Source

pub fn get_session(&self) -> LastFmEditSession

Source

pub fn restore_session(&self, session: LastFmEditSession)

Source

pub fn with_shared_broadcaster( &self, client: Box<dyn HttpClient + Send + Sync>, ) -> Self

Source

pub fn username(&self) -> String

Source

pub async fn validate_session(&self) -> bool

Source

pub async fn delete_scrobble( &self, artist_name: &str, track_name: &str, timestamp: u64, ) -> Result<bool>

Source

pub fn subscribe(&self) -> ClientEventReceiver

Source

pub fn latest_event(&self) -> Option<ClientEvent>

Source

pub async fn get_recent_scrobbles(&self, page: u32) -> Result<Vec<Track>>

Source

pub async fn get_recent_tracks_page(&self, page: u32) -> Result<TrackPage>

Source

pub async fn find_recent_scrobble_for_track( &self, track_name: &str, artist_name: &str, max_pages: u32, ) -> Result<Option<Track>>

Source

pub async fn edit_scrobble(&self, edit: &ScrobbleEdit) -> Result<EditResponse>

Source

pub async fn edit_scrobble_single( &self, exact_edit: &ExactScrobbleEdit, max_retries: u32, ) -> Result<EditResponse>

Source

pub async fn load_edit_form_values_internal( &self, track_name: &str, artist_name: &str, ) -> Result<Vec<ExactScrobbleEdit>>

Source

pub async fn get_artist_tracks_page( &self, artist: &str, page: u32, ) -> Result<TrackPage>

Source

pub fn extract_tracks_from_document( &self, document: &Html, artist: &str, album: Option<&str>, ) -> Result<Vec<Track>>

Source

pub fn parse_tracks_page( &self, document: &Html, page_number: u32, artist: &str, album: Option<&str>, ) -> Result<TrackPage>

Source

pub fn parse_recent_scrobbles(&self, document: &Html) -> Result<Vec<Track>>

Source

pub async fn get(&self, url: &str) -> Result<Response>

Source

pub async fn get_artist_albums_page( &self, artist: &str, page: u32, ) -> Result<AlbumPage>

Source

pub async fn get_album_tracks_page( &self, album_name: &str, artist_name: &str, page: u32, ) -> Result<TrackPage>

Trait Implementations§

Source§

impl Clone for LastFmEditClientImpl

Source§

fn clone(&self) -> LastFmEditClientImpl

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl LastFmEditClient for LastFmEditClientImpl

Source§

fn username(&self) -> String

Get the currently authenticated username.
Source§

fn get_recent_scrobbles<'life0, 'async_trait>( &'life0 self, page: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch recent scrobbles from the user’s listening history.
Source§

fn find_recent_scrobble_for_track<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, track_name: &'life1 str, artist_name: &'life2 str, max_pages: u32, ) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Find the most recent scrobble for a specific track.
Source§

fn edit_scrobble<'life0, 'life1, 'async_trait>( &'life0 self, edit: &'life1 ScrobbleEdit, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Edit scrobbles by discovering and updating all matching instances. Read more
Source§

fn edit_scrobble_single<'life0, 'life1, 'async_trait>( &'life0 self, exact_edit: &'life1 ExactScrobbleEdit, max_retries: u32, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Edit a single scrobble with complete information and retry logic. Read more
Source§

fn get_session(&self) -> LastFmEditSession

Extract the current session state for persistence. Read more
Source§

fn restore_session(&self, session: LastFmEditSession)

Restore session state from a previously saved session. Read more
Source§

fn subscribe(&self) -> ClientEventReceiver

Subscribe to internal client events. Read more
Source§

fn latest_event(&self) -> Option<ClientEvent>

Get the latest client event without subscribing to future events. Read more
Source§

fn discover_scrobbles( &self, edit: ScrobbleEdit, ) -> Box<dyn AsyncDiscoveryIterator<ExactScrobbleEdit>>

Create an incremental discovery iterator for scrobble editing. Read more
Source§

fn get_artist_tracks_page<'life0, 'life1, 'async_trait>( &'life0 self, artist: &'life1 str, page: u32, ) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a page of tracks from the user’s library for the specified artist.
Source§

fn get_artist_albums_page<'life0, 'life1, 'async_trait>( &'life0 self, artist: &'life1 str, page: u32, ) -> Pin<Box<dyn Future<Output = Result<AlbumPage>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a page of albums from the user’s library for the specified artist.
Source§

fn get_album_tracks_page<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, album_name: &'life1 str, artist_name: &'life2 str, page: u32, ) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a page of tracks from a specific album in the user’s library.
Source§

fn artist_tracks(&self, artist: &str) -> ArtistTracksIterator

Create an iterator for browsing an artist’s tracks from the user’s library.
Source§

fn artist_albums(&self, artist: &str) -> ArtistAlbumsIterator

Create an iterator for browsing an artist’s albums from the user’s library.
Source§

fn album_tracks( &self, album_name: &str, artist_name: &str, ) -> AlbumTracksIterator

Create an iterator for browsing tracks from a specific album.
Source§

fn recent_tracks(&self) -> RecentTracksIterator

Create an iterator for browsing the user’s recent tracks/scrobbles.
Source§

fn recent_tracks_from_page(&self, starting_page: u32) -> RecentTracksIterator

Create an iterator for browsing the user’s recent tracks starting from a specific page.
Source§

fn validate_session<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate if the current session is still working. Read more
Source§

fn delete_scrobble<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, artist_name: &'life1 str, track_name: &'life2 str, timestamp: u64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a scrobble by its identifying information. Read more
Source§

fn get_recent_tracks_page<'life0, 'async_trait>( &'life0 self, page: u32, ) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a page of tracks from the user’s recent listening history.
Source§

fn discover_scrobble_edit_variations<'life0, 'life1, 'async_trait>( &'life0 self, edit: &'life1 ScrobbleEdit, ) -> Pin<Box<dyn Future<Output = Result<Vec<ExactScrobbleEdit>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Discover all scrobble edit variations based on the provided ScrobbleEdit template. Read more
Source§

fn get_album_tracks<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, album_name: &'life1 str, artist_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get tracks from a specific album page.
Source§

fn find_scrobble_by_timestamp<'life0, 'async_trait>( &'life0 self, timestamp: u64, ) -> Pin<Box<dyn Future<Output = Result<Track>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find a scrobble by its timestamp in recent scrobbles.
Source§

fn edit_album<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, old_album_name: &'life1 str, new_album_name: &'life2 str, artist_name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Edit album metadata by updating scrobbles with new album name.
Source§

fn edit_artist<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, old_artist_name: &'life1 str, new_artist_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Edit artist metadata by updating scrobbles with new artist name. Read more
Source§

fn edit_artist_for_track<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, track_name: &'life1 str, old_artist_name: &'life2 str, new_artist_name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Edit artist metadata for a specific track only. Read more
Source§

fn edit_artist_for_album<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, album_name: &'life1 str, old_artist_name: &'life2 str, new_artist_name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Edit artist metadata for all tracks in a specific album. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,