diff --git a/homegrown/email/src/main.rs b/homegrown/email/src/main.rs index 99f3ae5..dccfef3 100644 --- a/homegrown/email/src/main.rs +++ b/homegrown/email/src/main.rs @@ -11,22 +11,15 @@ struct Channel { #[tokio::main] async fn main() { let channellist = "https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.json"; - //getting the list of channels with id's first - // - //https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.json let resp = reqwest::get(channellist)//.await.unwrap().text().await; .await.unwrap() .text().await.unwrap(); -// let text = match resp { -// Ok(text) => text, -// Err(error) => println!("NOPE"), -// }; // let channels = serde_json::from_str::>(&resp).unwrap(); - let APIKEY = env::var("APIKEY").unwrap(); + let apikey = env::var("APIKEY").unwrap(); for i in channels { - let ID = i.id; - let videosRequest = format!("https://www.googleapis.com/youtube/v3/channels?id={ID}&key={APIKEY}&part=contentDetails"); - println!("{}", videosRequest); + let id = i.id; + let videos_request = format!("https://www.googleapis.com/youtube/v3/channels?id={id}&key={apikey}&part=contentDetails"); + println!("{}", videos_request); } }