mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
add sendVenue
This commit is contained in:
parent
6dda560cc3
commit
278f9690b7
10 changed files with 104 additions and 20 deletions
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct GetFile<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct GetFile<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct GetUserProfilePhotos<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct GetUserProfilePhotos<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct KickChatMember<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct KickChatMember<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct RestrictChatMember<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct RestrictChatMember<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct SendChatAction<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct SendChatAction<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct SendContact<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct SendContact<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct SendPoll<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct SendPoll<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,44 @@
|
||||||
//TODO:need implementation
|
use crate::core::requests::{ChatId, RequestContext};
|
||||||
struct SendVenue<'a> {}
|
|
||||||
|
///Use this method to send information about a venue. On success, the sent
|
||||||
|
/// Message is returned.
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct SendVenue<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
/// Integer or String Yes Unique identifier for the target chat or
|
||||||
|
/// username of the target channel (in the format @channelusername)
|
||||||
|
chat_id: ChatId,
|
||||||
|
/// Float number Yes Latitude of the venue
|
||||||
|
latitude: f64,
|
||||||
|
///Float number Yes Longitude of the venue
|
||||||
|
longitude: f64,
|
||||||
|
/// Yes Name of the venue
|
||||||
|
title: String,
|
||||||
|
///String Yes Address of the venue
|
||||||
|
address: String,
|
||||||
|
/// String Optional Foursquare identifier of the venue
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
foursquare_id: Option<String>,
|
||||||
|
/// String Optional Foursquare type of the venue, if known. (For
|
||||||
|
/// example, “arts_entertainment/default”, “arts_entertainment/aquarium” or
|
||||||
|
/// “food/icecream”.)
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
foursquare_type: Option<String>,
|
||||||
|
/// Boolean Optional Sends the message silently. Users will receive a
|
||||||
|
/// notification with no sound.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
disable_notification: Option<bool>,
|
||||||
|
/// Integer Optional If the message is a reply, ID of the original
|
||||||
|
/// message
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
reply_to_message_id: Option<i32>,
|
||||||
|
/// InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or
|
||||||
|
/// ForceReply Optional Additional interface options. A JSON-serialized
|
||||||
|
/// object for an inline keyboard, custom reply keyboard, instructions to
|
||||||
|
/// remove reply keyboard or to force a reply from the user.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
reply_markup: Option<()>, //TODO: need concrete type
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ use crate::core::{
|
||||||
/// returned, otherwise True is returned.
|
/// returned, otherwise True is returned.
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
struct StopMessageLiveLocation<'a> {
|
struct StopMessageLiveLocation<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
ctx: RequestContext<'a>,
|
ctx: RequestContext<'a>,
|
||||||
/// Required if inline_message_id is not specified. Unique identifier for
|
/// Required if inline_message_id is not specified. Unique identifier for
|
||||||
/// the target chat or username of the target channel (in the format
|
/// the target chat or username of the target channel (in the format
|
||||||
|
@ -65,7 +66,7 @@ impl<'a> StopMessageLiveLocation<'a> {
|
||||||
where
|
where
|
||||||
T: Into<ChatId>,
|
T: Into<ChatId>,
|
||||||
{
|
{
|
||||||
self.chat_id = chat_id.into();
|
self.chat_id = Some(chat_id.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@ impl<'a> StopMessageLiveLocation<'a> {
|
||||||
where
|
where
|
||||||
T: Into<InlineKeyboardMarkup>,
|
T: Into<InlineKeyboardMarkup>,
|
||||||
{
|
{
|
||||||
self.inline_message_id = Some(reply_markup.into());
|
self.reply_markup = Some(reply_markup.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
//TODO: need implementation
|
use crate::core::requests::RequestContext;
|
||||||
struct UnbanChatMember<'a> {}
|
|
||||||
|
#[derive(Debug, Clone, Serialize)]
|
||||||
|
struct UnbanChatMember<'a> {
|
||||||
|
#[serde(skip_serializing)]
|
||||||
|
ctx: RequestContext<'a>,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue