ok
This commit is contained in:
@@ -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<dyn std::error::Error>> {
|
||||
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::<HashMap<String, String>>()
|
||||
.text()
|
||||
.await?;
|
||||
println!("{resp:#?}");
|
||||
Ok(())
|
||||
let channels: Vec<Channel> =serde_yaml_ng::from_str(&resp)?;
|
||||
|
||||
}
|
||||
|
4
static/yters.yaml
Normal file
4
static/yters.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
channels:
|
||||
- name: "squibquib"
|
||||
id: "UC-9-sjOyxoDCdQlVzObzGsw"
|
||||
kind: "letsplay"
|
Reference in New Issue
Block a user