use fyyd_api::v2::fyyd_api::FyydClient;
use reqwest::ClientBuilder;
#[tokio::main]
async fn main() {
let client_builder = ClientBuilder::new().timeout(std::time::Duration::from_secs(10));
let client = FyydClient::new(Some(client_builder));
let search_result = client
.search_podcast_feed(Some("rust".to_owned()), None, None, None)
.await;
match search_result {
Ok(response) => {
if let Some(podcasts) = response.data {
for podcast in podcasts {
println!("Title: {}", podcast.title);
println!("URL: {}", podcast.xml_url);
println!("Description: {}", podcast.description);
println!("---");
}
}
}
Err(error) => {
eprintln!("Error: {}", error);
}
}
}