Function lyrics_ovh::get_lyrics[][src]

pub async fn get_lyrics(title: &str, author: &str) -> Result<String, Error>

Fetch lyrics for the specified song.

Return

Returns lyrics as a string if they’re found.

Error

Returns the reqwest error if any occur.

Example

 #[tokio::main]
 pub async fn main(){
     let lyrics = get_lyrics("Popular Monster", "Falling in reverse").await;
     println!("Lyrics to the song Popular monster by Falling in reverse: \n {}", lyrics);
 }