Skip to content

Commit

Permalink
Telegram API 7.11 (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrat555 authored Nov 2, 2024
1 parent a593457 commit 3618a37
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/api_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ pub struct SendMessageParams {
pub link_preview_options: Option<LinkPreviewOptions>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand Down Expand Up @@ -290,6 +291,7 @@ pub struct CopyMessageParams {
pub show_caption_above_media: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
}
Expand Down Expand Up @@ -320,6 +322,7 @@ pub struct SendPhotoParams {
pub has_spoiler: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -341,6 +344,7 @@ pub struct SendAudioParams {
pub thumbnail: Option<FileUpload>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -360,6 +364,7 @@ pub struct SendDocumentParams {
pub disable_content_type_detection: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -384,6 +389,7 @@ pub struct SendVideoParams {
pub supports_streaming: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -407,6 +413,7 @@ pub struct SendAnimationParams {
pub has_spoiler: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -425,6 +432,7 @@ pub struct SendVoiceParams {
pub duration: Option<u32>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -442,6 +450,7 @@ pub struct SendVideoNoteParams {
pub thumbnail: Option<FileUpload>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -461,6 +470,7 @@ pub struct SendPaidMediaParams {
pub show_caption_above_media: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
}
Expand All @@ -473,8 +483,9 @@ pub struct SendMediaGroupParams {
pub message_thread_id: Option<i32>,
pub media: Vec<Media>,
pub disable_notification: Option<bool>,
pub message_effect_id: Option<String>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
}

Expand All @@ -491,6 +502,7 @@ pub struct SendLocationParams {
pub proximity_alert_radius: Option<u32>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand Down Expand Up @@ -536,6 +548,7 @@ pub struct SendVenueParams {
pub google_place_type: Option<String>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -553,6 +566,7 @@ pub struct SendContactParams {
pub vcard: Option<String>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand Down Expand Up @@ -581,6 +595,7 @@ pub struct SendPollParams {
pub is_closed: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand All @@ -595,6 +610,7 @@ pub struct SendDiceParams {
pub emoji: Option<String>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand Down Expand Up @@ -1113,6 +1129,7 @@ pub struct SendStickerParams {
pub emoji: Option<String>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
Expand Down Expand Up @@ -1271,6 +1288,7 @@ pub struct SendInvoiceParams {
pub is_flexible: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<InlineKeyboardMarkup>,
Expand Down Expand Up @@ -1349,6 +1367,7 @@ pub struct SendGameParams {
pub game_short_name: String,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub allow_paid_broadcast: Option<bool>,
pub message_effect_id: Option<String>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<InlineKeyboardMarkup>,
Expand Down
14 changes: 14 additions & 0 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ pub struct InlineKeyboardButton {
pub switch_inline_query: Option<String>,
pub switch_inline_query_current_chat: Option<String>,
pub switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>,
pub copy_text: Option<CopyTextButton>,
pub callback_game: Option<CallbackGame>,
pub pay: Option<bool>,
}
Expand All @@ -1097,6 +1098,12 @@ pub struct SwitchInlineQueryChosenChat {
pub allow_channel_chats: Option<bool>,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct CopyTextButton {
pub text: String,
}

#[apply(apistruct!)]
pub struct CallbackQuery {
pub id: String,
Expand Down Expand Up @@ -2227,6 +2234,7 @@ pub enum TransactionPartner {
User(TransactionPartnerUser),
Fragment(TransactionPartnerFragment),
TelegramAds(TransactionPartnerTelegramAds),
TelegramApi(TransactionPartnerTelegramApi),
Other(TransactionPartnerOther),
}

Expand All @@ -2248,6 +2256,12 @@ pub struct TransactionPartnerFragment {
#[derive(Eq)]
pub struct TransactionPartnerTelegramAds {}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct TransactionPartnerTelegramApi {
pub request_count: u64,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct TransactionPartnerOther {}
Expand Down

0 comments on commit 3618a37

Please sign in to comment.