Rename thumb to thumbnail (in missed constructor params)

This commit is contained in:
Сырцев Вадим Игоревич 2024-06-11 18:59:19 +03:00
parent f883651dbc
commit ae306e4fb7
4 changed files with 11 additions and 7 deletions

View file

@ -522,6 +522,7 @@ mod tests {
gif_height: None,
gif_duration: None,
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
thumbnail_mime_type: None,
title: None,
caption: None,
parse_mode: None,
@ -546,6 +547,7 @@ mod tests {
gif_height: Some(1),
gif_duration: Some(Seconds::from_seconds(1)),
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
thumbnail_mime_type: None,
title: Some(String::from("title")),
caption: Some(String::from("caption")),
parse_mode: Some(ParseMode::Html),
@ -620,6 +622,7 @@ mod tests {
mpeg4_height: None,
mpeg4_duration: None,
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
thumbnail_mime_type: None,
title: None,
caption: None,
parse_mode: None,
@ -644,6 +647,7 @@ mod tests {
mpeg4_height: Some(1),
mpeg4_duration: Some(Seconds::from_seconds(1)),
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
thumbnail_mime_type: None,
title: Some(String::from("title")),
caption: Some(String::from("caption")),
parse_mode: Some(ParseMode::Html),

View file

@ -59,14 +59,14 @@ pub struct InlineQueryResultPhoto {
}
impl InlineQueryResultPhoto {
pub fn new<S>(id: S, photo_url: reqwest::Url, thumb_url: reqwest::Url) -> Self
pub fn new<S>(id: S, photo_url: reqwest::Url, thumbnail_url: reqwest::Url) -> Self
where
S: Into<String>,
{
Self {
id: id.into(),
photo_url,
thumbnail_url: thumb_url,
thumbnail_url,
photo_width: None,
photo_height: None,
title: None,

View file

@ -76,7 +76,7 @@ impl InlineQueryResultVideo {
id: S1,
video_url: reqwest::Url,
mime_type: Mime,
thumb_url: reqwest::Url,
thumbnail_url: reqwest::Url,
title: S2,
) -> Self
where
@ -87,7 +87,7 @@ impl InlineQueryResultVideo {
id: id.into(),
video_url,
mime_type,
thumbnail_url: thumb_url,
thumbnail_url,
title: title.into(),
caption: None,
parse_mode: None,

View file

@ -1708,7 +1708,7 @@ mod tests {
"width": 512,
"height": 640,
"mime_type": "video/mp4",
"thumb": {
"thumbnail": {
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
"file_unique_id":"",
"file_size": 10339,
@ -1800,7 +1800,7 @@ mod tests {
"width": 512,
"height": 640,
"mime_type": "video/mp4",
"thumb": {
"thumbnail": {
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
"file_unique_id":"",
"file_size": 10339,
@ -1870,7 +1870,7 @@ mod tests {
"is_animated": true,
"is_video": false,
"type": "regular",
"thumb": {
"thumbnail": {
"file_id": "AAMCAgADGQEAARIt0GMwiZ6n4nRbxdpM3pL8vPX6PVAhAAIjAAOw0PgMaabKAcaXKCABAAdtAAMpBA",
"file_unique_id": "AQADIwADsND4DHI",
"file_size": 4118,