mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Add docs for core::types{Venue, Video}
This commit is contained in:
parent
7a2e8fd33b
commit
26ba1919be
2 changed files with 17 additions and 1 deletions
|
@ -1,12 +1,19 @@
|
|||
use crate::core::types::Location;
|
||||
|
||||
|
||||
/// This object represents a venue.
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize, Clone)]
|
||||
pub struct Venue {
|
||||
/// Venue location
|
||||
pub location: Location,
|
||||
/// Name of the venue
|
||||
pub title: String,
|
||||
/// Address of the venue
|
||||
pub address: String,
|
||||
/// Foursquare identifier of the venue
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub foursquare_id: Option<String>,
|
||||
/// Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub foursquare_type: Option<String>,
|
||||
pub foursquare_type: Option<String>, // TODO: is this enum?...
|
||||
}
|
|
@ -1,12 +1,21 @@
|
|||
use crate::core::types::PhotoSize;
|
||||
|
||||
|
||||
/// This object represents a video file.
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize, Clone)]
|
||||
pub struct Video {
|
||||
/// Identifier for this file
|
||||
pub file_id: String,
|
||||
/// Video width as defined by sender
|
||||
pub width: u32,
|
||||
/// Video height as defined by sender
|
||||
pub height: u32,
|
||||
/// Duration of the video in seconds as defined by sender
|
||||
pub duration: u32,
|
||||
/// Video thumbnail
|
||||
pub thumb: Option<PhotoSize>,
|
||||
/// Mime type of a file as defined by sender
|
||||
pub mime_type: Option<String>,
|
||||
/// File size
|
||||
pub file_size: Option<u32>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue