youtube_api/models/
snippet.rs

1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Clone, Debug, Serialize, Deserialize)]
6#[serde(rename_all = "camelCase")]
7pub struct Snippet {
8    pub published_at: String,
9    pub channel_id: String,
10    pub title: String,
11    pub description: String,
12    pub thumbnails: HashMap<String, Thumbnail>,
13    pub channel_title: String,
14    pub live_broadcast_content: Option<String>
15}
16
17#[derive(Clone, Debug, Serialize, Deserialize)]
18pub struct Thumbnail {
19    pub url: String,
20    pub width: Option<u64>,
21    pub height: Option<u64>,
22}