ok
This commit is contained in:
@@ -10,7 +10,6 @@ reqwest = { version = "0.12", features = ["json"] }
|
|||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
lettre = "0.11"
|
lettre = "0.11"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_yaml_ng = "0.9"
|
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
google-youtube3 = "*"
|
google-youtube3 = "*"
|
||||||
|
|
||||||
|
@@ -2,4 +2,6 @@
|
|||||||
sends me an email every monday with all the new videos from channels i like on youtbue
|
sends me an email every monday with all the new videos from channels i like on youtbue
|
||||||
|
|
||||||
# status
|
# status
|
||||||
man, idk why but the request for my raw content just gives {} rn. i'm too tired to figure it out, it's for tomorrow
|
can read the json, now to actually implement the youtube api calls.
|
||||||
|
Prolly just gonna call the api directly with reqwest.
|
||||||
|
add <option> datafields in the struct. cleanup the "listje"
|
||||||
|
@@ -1,14 +1,11 @@
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
#[derive(Deserialize)]
|
|
||||||
struct listje {
|
|
||||||
items: Vec<Channel>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Channel {
|
struct Channel {
|
||||||
id: String,
|
id: String,
|
||||||
name: String,
|
name: String,
|
||||||
kind: String
|
kind: String
|
||||||
|
channel
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@@ -25,5 +22,8 @@ async fn main() {
|
|||||||
// Err(error) => println!("NOPE"),
|
// Err(error) => println!("NOPE"),
|
||||||
// }; //
|
// }; //
|
||||||
let channels =serde_json::from_str::<Vec<Channel>>(&resp).unwrap();
|
let channels =serde_json::from_str::<Vec<Channel>>(&resp).unwrap();
|
||||||
|
for i in channels {
|
||||||
|
println!{"{:#?}", i.name};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
[
|
[
|
||||||
{ "name":"squibquib",
|
{
|
||||||
|
"name":"squibquib",
|
||||||
"id": "UC-9-sjOyxoDCdQlVzObzGsw",
|
"id": "UC-9-sjOyxoDCdQlVzObzGsw",
|
||||||
"kind": "letsplay"
|
"kind": "letsplay"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user