From 35b7a2c6cf50b6eb65de94b4683f01e3bc1f9fe8 Mon Sep 17 00:00:00 2001 From: Waffle Date: Wed, 18 Sep 2019 23:51:54 +0300 Subject: [PATCH] Add missing `InlineQueryResult*` structs --- src/core/types/inline_query_result_audio.rs | 16 ++++++++++++++++ .../types/inline_query_result_cached_gif.rs | 13 +++++++++++++ .../types/inline_query_result_cached_photo.rs | 15 +++++++++++++++ src/core/types/inline_query_result_contact.rs | 17 +++++++++++++++++ .../types/inline_query_result_document.rs | 18 ++++++++++++++++++ src/core/types/inline_query_result_game.rs | 10 ++++++++++ .../types/inline_query_result_location.rs | 18 ++++++++++++++++++ src/core/types/inline_query_result_venue.rs | 19 +++++++++++++++++++ src/core/types/inline_query_result_voice.rs | 14 ++++++++++++++ 9 files changed, 140 insertions(+) create mode 100644 src/core/types/inline_query_result_audio.rs create mode 100644 src/core/types/inline_query_result_cached_gif.rs create mode 100644 src/core/types/inline_query_result_cached_photo.rs create mode 100644 src/core/types/inline_query_result_contact.rs create mode 100644 src/core/types/inline_query_result_document.rs create mode 100644 src/core/types/inline_query_result_game.rs create mode 100644 src/core/types/inline_query_result_location.rs create mode 100644 src/core/types/inline_query_result_venue.rs create mode 100644 src/core/types/inline_query_result_voice.rs diff --git a/src/core/types/inline_query_result_audio.rs b/src/core/types/inline_query_result_audio.rs new file mode 100644 index 00000000..119184fc --- /dev/null +++ b/src/core/types/inline_query_result_audio.rs @@ -0,0 +1,16 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultAudio { + pub id: String, + pub audio_url: String, + pub title: String, + pub caption: Option, + pub parse_mode: Option, + pub performer: Option, + pub audio_duration: Option, + pub reply_markup: Option, + pub input_message_content: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_cached_gif.rs b/src/core/types/inline_query_result_cached_gif.rs new file mode 100644 index 00000000..4b083bfd --- /dev/null +++ b/src/core/types/inline_query_result_cached_gif.rs @@ -0,0 +1,13 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; + +#[derive(Debug, Deserialize, Clone, PartialEq)] +pub struct InlineQueryResultCachedGif { + pub id: String, + pub gif_file_id: String, + pub title: Option, + pub caption: Option, + pub parse_mode: Option, + pub reply_markup: Option, + pub input_message_content: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_cached_photo.rs b/src/core/types/inline_query_result_cached_photo.rs new file mode 100644 index 00000000..645808c5 --- /dev/null +++ b/src/core/types/inline_query_result_cached_photo.rs @@ -0,0 +1,15 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultCachedPhoto { + pub id: String, + pub photo_file_id: String, + pub title: Option, + pub description: Option, + pub caption: Option, + pub parse_mode: Option, + pub reply_markup: Option, + pub input_message_content: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_contact.rs b/src/core/types/inline_query_result_contact.rs new file mode 100644 index 00000000..141aca39 --- /dev/null +++ b/src/core/types/inline_query_result_contact.rs @@ -0,0 +1,17 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultContact { + pub id: String, + pub phone_number: String, + pub first_name: String, + pub last_name: Option, + pub vcard: Option, + pub reply_markup: Option, + pub input_message_content: Option, + pub thumb_url: Option, + pub thumb_width: Option, + pub thumb_height: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_document.rs b/src/core/types/inline_query_result_document.rs new file mode 100644 index 00000000..23cb0a61 --- /dev/null +++ b/src/core/types/inline_query_result_document.rs @@ -0,0 +1,18 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultDocument { + pub id: String, + pub title: String, + pub caption: Option, + pub parse_mode: Option, + pub document_url: String, + pub mime_type: String, + pub description: Option, + pub reply_markup: Option, + pub input_message_content: Option, + pub thumb_url: Option, + pub thumb_width: Option, + pub thumb_height: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_game.rs b/src/core/types/inline_query_result_game.rs new file mode 100644 index 00000000..5ce90f86 --- /dev/null +++ b/src/core/types/inline_query_result_game.rs @@ -0,0 +1,10 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultGame { + pub id: String, + pub game_short_name: String, + pub reply_markup: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_location.rs b/src/core/types/inline_query_result_location.rs new file mode 100644 index 00000000..77feb856 --- /dev/null +++ b/src/core/types/inline_query_result_location.rs @@ -0,0 +1,18 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultLocation { + pub id: String, + pub latitude: f64, + pub longitude: f64, + pub title: String, + pub live_period: i32, + pub reply_markup: InlineKeyboardMarkup, + pub input_message_content: InputMessageContent, + pub thumb_url: String, + pub thumb_width: i32, + pub thumb_height: i32, + +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_venue.rs b/src/core/types/inline_query_result_venue.rs new file mode 100644 index 00000000..1dfd9a37 --- /dev/null +++ b/src/core/types/inline_query_result_venue.rs @@ -0,0 +1,19 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; +use crate::core::types::parse_mode::ParseMode; + +#[derive(Debug, Serialize, Clone, PartialEq)] +pub struct InlineQueryResultVenue { + pub id: String, + pub latitude: f64, + pub longitude: f64, + pub title: String, + pub address: String, + pub foursquare_id: Option, + pub foursquare_type: Option, + pub reply_markup: Option, + pub input_message_content: Option, + pub thumb_url: Option, + pub thumb_width: Option, + pub thumb_height: Option, +} \ No newline at end of file diff --git a/src/core/types/inline_query_result_voice.rs b/src/core/types/inline_query_result_voice.rs new file mode 100644 index 00000000..25624795 --- /dev/null +++ b/src/core/types/inline_query_result_voice.rs @@ -0,0 +1,14 @@ +use super::inline_keyboard_markup::InlineKeyboardMarkup; +use super::input_message_content::InputMessageContent; + +#[derive(Debug, Deserialize, Clone, PartialEq)] +pub struct InlineQueryResultVoice { + pub id: String, + pub voice_url: String, + pub title: String, + pub caption: Option, + pub parse_mode: Option, + pub voice_duration: Option, + pub reply_markup: Option, + pub input_message_content: Option, +} \ No newline at end of file