From c343f8659c7b5e2c76f4e4916aaba136fa9f57ba Mon Sep 17 00:00:00 2001 From: bvanroll Date: Tue, 8 Jul 2025 10:32:11 +0200 Subject: [PATCH] ok --- homegrown/email/src/main.rs | 12 +++++++----- static/yters.yaml | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 static/yters.yaml diff --git a/homegrown/email/src/main.rs b/homegrown/email/src/main.rs index b3bc8b4..8cb4072 100644 --- a/homegrown/email/src/main.rs +++ b/homegrown/email/src/main.rs @@ -4,17 +4,19 @@ use std::collections::HashMap; struct Channel { id: String, name: String, - type: String + kind: String } #[tokio::main] async fn main() -> Result<(), Box> { + let channellist = "https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.yaml"; //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("https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.json") + let resp = reqwest::get(channellist) .await? - .json::>() + .text() .await?; - println!("{resp:#?}"); - Ok(()) + let channels: Vec =serde_yaml_ng::from_str(&resp)?; + } diff --git a/static/yters.yaml b/static/yters.yaml new file mode 100644 index 0000000..cf9d105 --- /dev/null +++ b/static/yters.yaml @@ -0,0 +1,4 @@ +channels: + - name: "squibquib" + id: "UC-9-sjOyxoDCdQlVzObzGsw" + kind: "letsplay"