Provider

Trait Provider 

Source
pub trait Provider {
Show 14 methods // Required method fn get_provider_scopes(&self) -> MoosyncResult<Vec<ExtensionProviderScope>>; // Provided methods fn get_playlists( &self, req: RequestedPlaylistsRequest, ) -> MoosyncResult<Vec<Playlist>> { ... } fn get_playlist_content( &self, req: RequestedPlaylistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType> { ... } fn get_playlist_from_url( &self, req: RequestedPlaylistFromUrlRequest, ) -> MoosyncResult<Option<Playlist>> { ... } fn get_playback_details( &self, req: PlaybackDetailsRequestedRequest, ) -> MoosyncResult<PlaybackDetailsReturnType> { ... } fn search( &self, req: RequestedSearchResultRequest, ) -> MoosyncResult<SearchResult> { ... } fn get_recommendations( &self, req: RequestedRecommendationsRequest, ) -> MoosyncResult<Vec<Song>> { ... } fn get_song_from_url( &self, req: RequestedSongFromUrlRequest, ) -> MoosyncResult<Option<Song>> { ... } fn handle_custom_request( &self, req: CustomRequest, ) -> MoosyncResult<CustomRequestReturnType> { ... } fn get_artist_songs( &self, req: RequestedArtistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType> { ... } fn get_album_songs( &self, req: RequestedAlbumSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType> { ... } fn get_song_from_id( &self, req: RequestedSongFromIdRequest, ) -> MoosyncResult<Option<Song>> { ... } fn scrobble(&self, req: ScrobbleRequest) -> MoosyncResult<()> { ... } fn get_lyrics(&self, req: RequestedLyricsRequest) -> MoosyncResult<String> { ... }
}
Expand description

Trait for handling provider-related events.

Required Methods§

Source

fn get_provider_scopes(&self) -> MoosyncResult<Vec<ExtensionProviderScope>>

Called when the main app requests the provider scopes.

Provided Methods§

Source

fn get_playlists( &self, req: RequestedPlaylistsRequest, ) -> MoosyncResult<Vec<Playlist>>

Called when the main app requests the list of playlists.

Source

fn get_playlist_content( &self, req: RequestedPlaylistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>

Called when the main app requests the content of a specific playlist.

Source

fn get_playlist_from_url( &self, req: RequestedPlaylistFromUrlRequest, ) -> MoosyncResult<Option<Playlist>>

Called when the main app requests a playlist from a URL.

Source

fn get_playback_details( &self, req: PlaybackDetailsRequestedRequest, ) -> MoosyncResult<PlaybackDetailsReturnType>

Called when the main app requests playback details for a song.

Source

fn search( &self, req: RequestedSearchResultRequest, ) -> MoosyncResult<SearchResult>

Called when the main app performs a search.

Source

fn get_recommendations( &self, req: RequestedRecommendationsRequest, ) -> MoosyncResult<Vec<Song>>

Called when the main app requests recommendations.

Source

fn get_song_from_url( &self, req: RequestedSongFromUrlRequest, ) -> MoosyncResult<Option<Song>>

Called when the main app requests a song from a URL.

Source

fn handle_custom_request( &self, req: CustomRequest, ) -> MoosyncResult<CustomRequestReturnType>

Called when the main app handles a custom request.

Source

fn get_artist_songs( &self, req: RequestedArtistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>

Called when the main app requests songs of a specific artist.

Source

fn get_album_songs( &self, req: RequestedAlbumSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>

Called when the main app requests songs of a specific album.

Source

fn get_song_from_id( &self, req: RequestedSongFromIdRequest, ) -> MoosyncResult<Option<Song>>

Called when the main app requests a song from an ID.

Source

fn scrobble(&self, req: ScrobbleRequest) -> MoosyncResult<()>

Called when the main app requests to scrobble a song.

Source

fn get_lyrics(&self, req: RequestedLyricsRequest) -> MoosyncResult<String>

Called when the main app requests lyrics for a song.

Implementors§