mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Added Venue; #[skip_serizlizing_if = "Option::is_none"] where it is missed
This commit is contained in:
parent
3a80ecacc0
commit
52e8507be4
5 changed files with 24 additions and 0 deletions
|
@ -2,5 +2,6 @@
|
||||||
pub struct AnswerPreCheckoutQuery {
|
pub struct AnswerPreCheckoutQuery {
|
||||||
pub pre_checkout_query_id: String,
|
pub pre_checkout_query_id: String,
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub error_message: Option<String>,
|
pub error_message: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ use crate::core::types::ShippingOption;
|
||||||
pub struct AnswerShippingQuery {
|
pub struct AnswerShippingQuery {
|
||||||
pub shipping_query_id: String,
|
pub shipping_query_id: String,
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub shipping_options: Option<Vec<ShippingOption>>,
|
pub shipping_options: Option<Vec<ShippingOption>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub error_message: Option<String>,
|
pub error_message: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,14 @@ use crate::core::types::PhotoSize;
|
||||||
pub struct Audio {
|
pub struct Audio {
|
||||||
pub file_id: String,
|
pub file_id: String,
|
||||||
pub duration: u32,
|
pub duration: u32,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub performer: Option<String>,
|
pub performer: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub title: Option<String>,
|
pub title: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub mime_type: Option<String>,
|
pub mime_type: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub thumb: Option<PhotoSize>
|
pub thumb: Option<PhotoSize>
|
||||||
}
|
}
|
|
@ -1,7 +1,10 @@
|
||||||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
||||||
pub struct LoginUrl {
|
pub struct LoginUrl {
|
||||||
url: String,
|
url: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
forward_text: Option<String>,
|
forward_text: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
bot_username: Option<String>,
|
bot_username: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
request_write_access: Option<bool>,
|
request_write_access: Option<bool>,
|
||||||
}
|
}
|
13
src/core/types/venue.rs
Normal file
13
src/core/types/venue.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
use crate::core::types::Location;
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||||
|
pub struct Venue {
|
||||||
|
pub location: Location,
|
||||||
|
pub title: String,
|
||||||
|
pub address: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foursquare_id: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foursquare_type: Option<String>
|
||||||
|
}
|
Loading…
Reference in a new issue