mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Fix SetWebhook
Make `GetUpdates::allowed_updates` optional
This commit is contained in:
parent
d9986b02dd
commit
7600a88312
81 changed files with 93 additions and 99 deletions
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- `set_webhook` signature (make `allowed_updates` optional) ([#59][pr59])
|
||||
- Fix typos in payloads ([#57][pr57]):
|
||||
- `get_updates`: `offset` `i64` -> `i32`
|
||||
- `send_location`: make `live_period` optional
|
||||
|
@ -16,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
[pr56]: https://github.com/teloxide/teloxide-core/pull/56
|
||||
[pr57]: https://github.com/teloxide/teloxide-core/pull/57
|
||||
[pr59]: https://github.com/teloxide/teloxide-core/pull/59
|
||||
|
||||
## [0.1.1] - 2020-02-17
|
||||
|
||||
|
|
|
@ -20,15 +20,11 @@ impl Requester for Bot {
|
|||
|
||||
type SetWebhook = JsonRequest<payloads::SetWebhook>;
|
||||
|
||||
fn set_webhook<U, A>(&self, url: U, allowed_updates: A) -> Self::SetWebhook
|
||||
fn set_webhook<U>(&self, url: U) -> Self::SetWebhook
|
||||
where
|
||||
U: Into<String>,
|
||||
A: IntoIterator<Item = crate::types::AllowedUpdate>,
|
||||
{
|
||||
Self::SetWebhook::new(
|
||||
self.clone(),
|
||||
payloads::SetWebhook::new(url, allowed_updates),
|
||||
)
|
||||
Self::SetWebhook::new(self.clone(), payloads::SetWebhook::new(url))
|
||||
}
|
||||
|
||||
type DeleteWebhook = JsonRequest<payloads::DeleteWebhook>;
|
||||
|
|
|
@ -393,7 +393,7 @@ macro_rules! impl_payload {
|
|||
}
|
||||
|
||||
#[macro_use]
|
||||
// This macro is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This macro is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS MACRO**,
|
||||
// edit `cg` instead.
|
||||
macro_rules! requester_forward {
|
||||
|
@ -403,8 +403,6 @@ macro_rules! requester_forward {
|
|||
requester_forward!(@method $rest $body $ty);
|
||||
)*
|
||||
};
|
||||
|
||||
|
||||
(@method get_updates $body:ident $ty:ident) => {
|
||||
type GetUpdates = $ty![GetUpdates];
|
||||
|
||||
|
@ -416,10 +414,9 @@ macro_rules! requester_forward {
|
|||
(@method set_webhook $body:ident $ty:ident) => {
|
||||
type SetWebhook = $ty![SetWebhook];
|
||||
|
||||
fn set_webhook<U, A>(&self, url: U, allowed_updates: A) -> Self::SetWebhook where U: Into<String>,
|
||||
A: IntoIterator<Item = AllowedUpdate> {
|
||||
fn set_webhook<U>(&self, url: U) -> Self::SetWebhook where U: Into<String> {
|
||||
let this = self;
|
||||
$body!(set_webhook this (url: U, allowed_updates: A))
|
||||
$body!(set_webhook this (url: U))
|
||||
}
|
||||
};
|
||||
(@method delete_webhook $body:ident $ty:ident) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
@ -17,12 +17,6 @@ impl_payload! {
|
|||
required {
|
||||
/// HTTPS url to send updates to. Use an empty string to remove webhook integration
|
||||
pub url: String [into],
|
||||
/// A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See [`Update`] for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.
|
||||
///
|
||||
/// Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.
|
||||
///
|
||||
/// [`Update`]: crate::types::Update
|
||||
pub allowed_updates: Vec<AllowedUpdate> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Upload your public key certificate so that the root certificate in use can be checked. See our [self-signed guide] for details.
|
||||
|
@ -31,6 +25,12 @@ impl_payload! {
|
|||
pub certificate: InputFile,
|
||||
/// Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.
|
||||
pub max_connections: u8,
|
||||
/// A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See [`Update`] for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.
|
||||
///
|
||||
/// Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.
|
||||
///
|
||||
/// [`Update`]: crate::types::Update
|
||||
pub allowed_updates: Vec<AllowedUpdate> [collect],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS FILE**,
|
||||
// edit `cg` instead.
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -53,7 +53,7 @@ pub trait Requester {
|
|||
/// Error type returned by all requests.
|
||||
type Err: std::error::Error + Send;
|
||||
|
||||
// This block is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
|
||||
// This block is auto generated by `cg` <https://github.com/teloxide/cg> (24572cd + local changes).
|
||||
// **DO NOT EDIT THIS BLOCK**,
|
||||
// edit `cg` instead.
|
||||
|
||||
|
@ -65,10 +65,9 @@ pub trait Requester {
|
|||
type SetWebhook: Request<Payload = SetWebhook, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`SetWebhook`].
|
||||
fn set_webhook<U, A>(&self, url: U, allowed_updates: A) -> Self::SetWebhook
|
||||
fn set_webhook<U>(&self, url: U) -> Self::SetWebhook
|
||||
where
|
||||
U: Into<String>,
|
||||
A: IntoIterator<Item = AllowedUpdate>;
|
||||
U: Into<String>;
|
||||
|
||||
type DeleteWebhook: Request<Payload = DeleteWebhook, Err = Self::Err>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue