mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +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 pre_checkout_query_id: String,
|
||||
pub ok: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ use crate::core::types::ShippingOption;
|
|||
pub struct AnswerShippingQuery {
|
||||
pub shipping_query_id: String,
|
||||
pub ok: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub shipping_options: Option<Vec<ShippingOption>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
|
|
@ -5,9 +5,14 @@ use crate::core::types::PhotoSize;
|
|||
pub struct Audio {
|
||||
pub file_id: String,
|
||||
pub duration: u32,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub performer: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub mime_type: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub file_size: Option<u32>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub thumb: Option<PhotoSize>
|
||||
}
|
|
@ -1,7 +1,10 @@
|
|||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
||||
pub struct LoginUrl {
|
||||
url: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
forward_text: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
bot_username: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
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