Add missing InlineQueryResult* structs

This commit is contained in:
Waffle 2019-09-18 23:51:54 +03:00
parent 3b6b147b69
commit 35b7a2c6cf
9 changed files with 140 additions and 0 deletions

View file

@ -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<String>,
pub parse_mode: Option<ParseMode>,
pub performer: Option<String>,
pub audio_duration: Option<String>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
}

View file

@ -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<String>,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
}

View file

@ -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<String>,
pub description: Option<String>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
}

View file

@ -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<String>,
pub vcard: Option<String>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
pub thumb_url: Option<String>,
pub thumb_width: Option<i32>,
pub thumb_height: Option<i32>,
}

View file

@ -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<String>,
pub parse_mode: Option<String>,
pub document_url: String,
pub mime_type: String,
pub description: Option<String>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
pub thumb_url: Option<String>,
pub thumb_width: Option<i32>,
pub thumb_height: Option<i32>,
}

View file

@ -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<InlineKeyboardMarkup>,
}

View file

@ -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,
}

View file

@ -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<String>,
pub foursquare_type: Option<String>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
pub thumb_url: Option<String>,
pub thumb_width: Option<i32>,
pub thumb_height: Option<i32>,
}

View file

@ -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<String>,
pub parse_mode: Option<String>,
pub voice_duration: Option<i32>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
}