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§
Sourcefn get_provider_scopes(&self) -> MoosyncResult<Vec<ExtensionProviderScope>>
fn get_provider_scopes(&self) -> MoosyncResult<Vec<ExtensionProviderScope>>
Called when the main app requests the provider scopes.
Provided Methods§
Sourcefn get_playlists(
&self,
req: RequestedPlaylistsRequest,
) -> MoosyncResult<Vec<Playlist>>
fn get_playlists( &self, req: RequestedPlaylistsRequest, ) -> MoosyncResult<Vec<Playlist>>
Called when the main app requests the list of playlists.
Sourcefn get_playlist_content(
&self,
req: RequestedPlaylistSongsRequest,
) -> MoosyncResult<SongsWithPageTokenReturnType>
fn get_playlist_content( &self, req: RequestedPlaylistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>
Called when the main app requests the content of a specific playlist.
Sourcefn get_playlist_from_url(
&self,
req: RequestedPlaylistFromUrlRequest,
) -> MoosyncResult<Option<Playlist>>
fn get_playlist_from_url( &self, req: RequestedPlaylistFromUrlRequest, ) -> MoosyncResult<Option<Playlist>>
Called when the main app requests a playlist from a URL.
Sourcefn get_playback_details(
&self,
req: PlaybackDetailsRequestedRequest,
) -> MoosyncResult<PlaybackDetailsReturnType>
fn get_playback_details( &self, req: PlaybackDetailsRequestedRequest, ) -> MoosyncResult<PlaybackDetailsReturnType>
Called when the main app requests playback details for a song.
Sourcefn search(
&self,
req: RequestedSearchResultRequest,
) -> MoosyncResult<SearchResult>
fn search( &self, req: RequestedSearchResultRequest, ) -> MoosyncResult<SearchResult>
Called when the main app performs a search.
Sourcefn get_recommendations(
&self,
req: RequestedRecommendationsRequest,
) -> MoosyncResult<Vec<Song>>
fn get_recommendations( &self, req: RequestedRecommendationsRequest, ) -> MoosyncResult<Vec<Song>>
Called when the main app requests recommendations.
Sourcefn get_song_from_url(
&self,
req: RequestedSongFromUrlRequest,
) -> MoosyncResult<Option<Song>>
fn get_song_from_url( &self, req: RequestedSongFromUrlRequest, ) -> MoosyncResult<Option<Song>>
Called when the main app requests a song from a URL.
Sourcefn handle_custom_request(
&self,
req: CustomRequest,
) -> MoosyncResult<CustomRequestReturnType>
fn handle_custom_request( &self, req: CustomRequest, ) -> MoosyncResult<CustomRequestReturnType>
Called when the main app handles a custom request.
Sourcefn get_artist_songs(
&self,
req: RequestedArtistSongsRequest,
) -> MoosyncResult<SongsWithPageTokenReturnType>
fn get_artist_songs( &self, req: RequestedArtistSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>
Called when the main app requests songs of a specific artist.
Sourcefn get_album_songs(
&self,
req: RequestedAlbumSongsRequest,
) -> MoosyncResult<SongsWithPageTokenReturnType>
fn get_album_songs( &self, req: RequestedAlbumSongsRequest, ) -> MoosyncResult<SongsWithPageTokenReturnType>
Called when the main app requests songs of a specific album.
Sourcefn get_song_from_id(
&self,
req: RequestedSongFromIdRequest,
) -> MoosyncResult<Option<Song>>
fn get_song_from_id( &self, req: RequestedSongFromIdRequest, ) -> MoosyncResult<Option<Song>>
Called when the main app requests a song from an ID.
Sourcefn scrobble(&self, req: ScrobbleRequest) -> MoosyncResult<()>
fn scrobble(&self, req: ScrobbleRequest) -> MoosyncResult<()>
Called when the main app requests to scrobble a song.
Sourcefn get_lyrics(&self, req: RequestedLyricsRequest) -> MoosyncResult<String>
fn get_lyrics(&self, req: RequestedLyricsRequest) -> MoosyncResult<String>
Called when the main app requests lyrics for a song.