mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Rename thumb to thumbnail (in missed constructor params)
This commit is contained in:
parent
f883651dbc
commit
ae306e4fb7
4 changed files with 11 additions and 7 deletions
|
@ -522,6 +522,7 @@ mod tests {
|
||||||
gif_height: None,
|
gif_height: None,
|
||||||
gif_duration: None,
|
gif_duration: None,
|
||||||
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
||||||
|
thumbnail_mime_type: None,
|
||||||
title: None,
|
title: None,
|
||||||
caption: None,
|
caption: None,
|
||||||
parse_mode: None,
|
parse_mode: None,
|
||||||
|
@ -546,6 +547,7 @@ mod tests {
|
||||||
gif_height: Some(1),
|
gif_height: Some(1),
|
||||||
gif_duration: Some(Seconds::from_seconds(1)),
|
gif_duration: Some(Seconds::from_seconds(1)),
|
||||||
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
||||||
|
thumbnail_mime_type: None,
|
||||||
title: Some(String::from("title")),
|
title: Some(String::from("title")),
|
||||||
caption: Some(String::from("caption")),
|
caption: Some(String::from("caption")),
|
||||||
parse_mode: Some(ParseMode::Html),
|
parse_mode: Some(ParseMode::Html),
|
||||||
|
@ -620,6 +622,7 @@ mod tests {
|
||||||
mpeg4_height: None,
|
mpeg4_height: None,
|
||||||
mpeg4_duration: None,
|
mpeg4_duration: None,
|
||||||
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
||||||
|
thumbnail_mime_type: None,
|
||||||
title: None,
|
title: None,
|
||||||
caption: None,
|
caption: None,
|
||||||
parse_mode: None,
|
parse_mode: None,
|
||||||
|
@ -644,6 +647,7 @@ mod tests {
|
||||||
mpeg4_height: Some(1),
|
mpeg4_height: Some(1),
|
||||||
mpeg4_duration: Some(Seconds::from_seconds(1)),
|
mpeg4_duration: Some(Seconds::from_seconds(1)),
|
||||||
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
thumbnail_url: Url::parse("http://thumb_url/").unwrap(),
|
||||||
|
thumbnail_mime_type: None,
|
||||||
title: Some(String::from("title")),
|
title: Some(String::from("title")),
|
||||||
caption: Some(String::from("caption")),
|
caption: Some(String::from("caption")),
|
||||||
parse_mode: Some(ParseMode::Html),
|
parse_mode: Some(ParseMode::Html),
|
||||||
|
|
|
@ -59,14 +59,14 @@ pub struct InlineQueryResultPhoto {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl 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
|
where
|
||||||
S: Into<String>,
|
S: Into<String>,
|
||||||
{
|
{
|
||||||
Self {
|
Self {
|
||||||
id: id.into(),
|
id: id.into(),
|
||||||
photo_url,
|
photo_url,
|
||||||
thumbnail_url: thumb_url,
|
thumbnail_url,
|
||||||
photo_width: None,
|
photo_width: None,
|
||||||
photo_height: None,
|
photo_height: None,
|
||||||
title: None,
|
title: None,
|
||||||
|
|
|
@ -76,7 +76,7 @@ impl InlineQueryResultVideo {
|
||||||
id: S1,
|
id: S1,
|
||||||
video_url: reqwest::Url,
|
video_url: reqwest::Url,
|
||||||
mime_type: Mime,
|
mime_type: Mime,
|
||||||
thumb_url: reqwest::Url,
|
thumbnail_url: reqwest::Url,
|
||||||
title: S2,
|
title: S2,
|
||||||
) -> Self
|
) -> Self
|
||||||
where
|
where
|
||||||
|
@ -87,7 +87,7 @@ impl InlineQueryResultVideo {
|
||||||
id: id.into(),
|
id: id.into(),
|
||||||
video_url,
|
video_url,
|
||||||
mime_type,
|
mime_type,
|
||||||
thumbnail_url: thumb_url,
|
thumbnail_url,
|
||||||
title: title.into(),
|
title: title.into(),
|
||||||
caption: None,
|
caption: None,
|
||||||
parse_mode: None,
|
parse_mode: None,
|
||||||
|
|
|
@ -1708,7 +1708,7 @@ mod tests {
|
||||||
"width": 512,
|
"width": 512,
|
||||||
"height": 640,
|
"height": 640,
|
||||||
"mime_type": "video/mp4",
|
"mime_type": "video/mp4",
|
||||||
"thumb": {
|
"thumbnail": {
|
||||||
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
|
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
|
||||||
"file_unique_id":"",
|
"file_unique_id":"",
|
||||||
"file_size": 10339,
|
"file_size": 10339,
|
||||||
|
@ -1800,7 +1800,7 @@ mod tests {
|
||||||
"width": 512,
|
"width": 512,
|
||||||
"height": 640,
|
"height": 640,
|
||||||
"mime_type": "video/mp4",
|
"mime_type": "video/mp4",
|
||||||
"thumb": {
|
"thumbnail": {
|
||||||
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
|
"file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE",
|
||||||
"file_unique_id":"",
|
"file_unique_id":"",
|
||||||
"file_size": 10339,
|
"file_size": 10339,
|
||||||
|
@ -1870,7 +1870,7 @@ mod tests {
|
||||||
"is_animated": true,
|
"is_animated": true,
|
||||||
"is_video": false,
|
"is_video": false,
|
||||||
"type": "regular",
|
"type": "regular",
|
||||||
"thumb": {
|
"thumbnail": {
|
||||||
"file_id": "AAMCAgADGQEAARIt0GMwiZ6n4nRbxdpM3pL8vPX6PVAhAAIjAAOw0PgMaabKAcaXKCABAAdtAAMpBA",
|
"file_id": "AAMCAgADGQEAARIt0GMwiZ6n4nRbxdpM3pL8vPX6PVAhAAIjAAOw0PgMaabKAcaXKCABAAdtAAMpBA",
|
||||||
"file_unique_id": "AQADIwADsND4DHI",
|
"file_unique_id": "AQADIwADsND4DHI",
|
||||||
"file_size": 4118,
|
"file_size": 4118,
|
||||||
|
|
Loading…
Reference in a new issue