mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
5.8 KiB
5.8 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[unreleased]
Added
- Support for
rustls
(#24) #[must_use]
attr to payloads implemented by macro (#22)- forward-to-deref
Requester
impls (#39) Bot::{set_,}api_url
methods (#26, #35)payloads
moduleRequesterExt
trait which is implemented for allRequester
s and allows easily wrapping them in adaptorsadaptors
module (#14)throttle
,cache_me
,auto_send
andfull
crate features- Request throttling - opt-in feature represented by
Throttle
bot adapter which allows automatically checking telegram limits (#10, #46) - Request auto sending - ability to
.await
requests without need to call.send()
(opt-in feature represented byAutoSend
bot adapter, #8) get_me
caching (opt-in feature represented byCacheMe
bot adapter)
Requester
trait which represents bot-clients (#7, #12, #27){Json,Multipart}Request
theBot
requests types (#6)Output<T>
alias to<<T as HasPayload>::Payload as Payload>::Output
Payload
,HasPayload
andRequest
traits which represent different parts of the request (#5)GetUpdatesNonStrict
'telegram' method, that behaves just likeGetUpdates
but doesn't #2 fail if one of updates fails to be deserialized- Move core code here from the
teloxide
main repo, for older changes see it'sCHANGELOG.md
.- Following modules were moved:
bot
requests
[exceptrequests::respond
function]types
errors
net
[private]
client_from_env
was moved fromteloxide::utils
to crate root ofteloxide-core
- To simplify
GetUpdates
request it was changed to simply returnVec<Update>
(instead ofVec<Result<Update, (Value, serde_json::Error)>>
)
- Following modules were moved:
Changed
- Cleanup setters in
types::*
(remove most of them) (#44) - Refactor
KeyboardButtonPollType
(#44) - Replace
Into<Vec<_>>
byIntoIterator<Item = _>
in function arguments (#44) - Update dependencies (including tokio 1.0) (#37)
- Refactor file downloading (#30):
- Make
net
module public - Move
Bot::download_file{,_stream}
methods to a newDownload
trait- Impl
Download
for all bot adaptors & theBot
itself
- Impl
- Change return type of
download_file_stream
— returnStream<Result<Bytes>>``, instead of
Future<Result<Stream<Result>>>`` - Add
api_url
param to standalone versions ofdownload_file{,_stream}
- Make
net::{TELEGRAM_API_URL, download_file{,_stream}}
pub
- Make
- Refactor
Bot
(#29):- Move default parse mode to an adaptor (
DefaultParseMode
) - Remove bot builder (it's not usefull anymore, since parse_mode is moved away)
- Undeprecate bot constructors (
Bot::{new, with_client, from_env_with_client}
)
- Move default parse mode to an adaptor (
- Rename
StickerType
=>InputSticker
,{CreateNewStickerSet,AddStickerToSet}::sticker_type}
=>sticker
(#23, #43) - Use
_: IntoIterator<Item = T>
bound instead of_: Into<Vec<T>>
in telegram methods which accept collections (#21) - Make
MessageDice::dice
pub (#20) - Merge
ApiErrorKind
andKnownApiErrorKind
intoApiError
(#13) - Refactor ChatMember (#9)
- Replace a bunch of
Option<_>
fields withChatMemberKind
- Remove setters (users are not expected to create this struct)
- Add getters
- Replace a bunch of
- Changed internal mechanism of sending multipart requests (#1)
- Added
RequestError::Io(io::Error)
to wrap I/O error those can happen while sending files to telegram - Make all fields of all methods
pub
(#3)