Waffle
bd4dba3bf1
Remove MessageEntity::text_from
because it's wrong
...
(the method assumes UTF-8 indices, but the indices are UTF-16)
(fuck you, telegram)
2021-01-26 16:21:47 +03:00
Waffle
09d0d886fa
Refactor KeyboardButtonPollType
...
- Make it enum
- Rename `ButtonRequest::KeyboardButtonPollType` => `<_>::poll`
2021-01-26 16:02:05 +03:00
Waffle
393f6ee7a4
Cleanup setters in types::*
...
- Remove useless setters for types which are only returned from telegam
- Add `const` on setters (where possible)
- Make `Poll::{open_period,close_date}` public
2021-01-26 15:35:08 +03:00
Waffle
5b328105fa
Sticker related fixes
...
- Rename `sticker_type.rs` => `input_sticker.rs` (after the contained type)
- Make `create_new_sticker_set` multipart
- Replace CreateNewStickerSet::{png,tgs}_sticker with `<_>::sticker`
- Fix GetStickerSet return type
- Revert some previous InputSticker changes: make the variants tuple structsm
remove constructors
2021-01-26 13:43:21 +03:00
Waffle
55c02e3311
Use edition-2018 style modules
...
Use `module_name.rs` instead of `module_name/mod.rs`.
Pros:
- It's easier to find the module file (especially for modules with lots of
submodules like `types`)
- Module file name is not 'magical'
2021-01-23 15:56:22 +03:00
Waffle
b93947c0ab
stop using serde internall module
2021-01-15 22:19:42 +03:00
Waffle
7852379852
Make Currency and CountryCode ISO compatible and add docs
2021-01-13 16:08:05 +03:00
Waffle
555bfc93d5
Refactor mime type handling
...
- Remove `MimeWrapper` from public api
- Use `mime::Mime` in public api instead
2021-01-13 16:07:26 +03:00
Waffle
50d3d67f93
fmt
2020-12-28 19:06:46 +03:00
Waffle
445c42b585
Refactor file downloading
...
- Make `net` module public
- Move `Bot::download_file{,_stream}` methods to a new `Download` trait
- Add `download_forward` macro to forward `Download` impls (priv)
- Impl `Download` for all bot adaptors & the `Bot` itself
- Change return type of `download_file_stream` — return `Stream<Result<Bytes>>``,
instead of `Future<Result<Stream<Result<Bytes>>>>``
- Add `api_url` param to standalone versions of `download_file{,_stream}`
- Make `net::{TELEGRAM_API_URL, download_file{,_stream}}` pub
- Small documentation changes
2020-12-12 15:52:47 +03:00
Waffle
3491a668b2
Fix doc links...
2020-12-06 16:34:44 +03:00
Waffle
0deb42e167
fix docs for InputSticker
2020-11-05 03:25:32 +03:00
Waffle
9d887e51bb
Rename StickerType
...
- Rename `StickerType` => `InputSticker`
- Rename `{CreateNewStickerSet,AddStickerToSet}::sticker_type}` => `sticker`
This just makes more sense.
2020-11-04 16:00:40 +03:00
Waffle
6ae9db4edd
make MessageDice::dice public
2020-10-28 19:05:28 +03:00
Waffle
9bf8c02c9d
doc & feature fixes
...
- Remove `unstable-stream` feature
- Doc fixes
2020-10-21 05:17:35 +03:00
Waffle
2f09e9930d
Decompose ChatMemberKind
as was requested per review
2020-10-10 14:17:52 +03:00
Waffle
91d78b65b3
Refactor ChatMember
...
- Replace a bunch of `Option<_>` fields with `hatMemberKind`
- Remove setters (users are not expected to create this struct)
- Add getters
2020-09-23 19:05:59 +03:00
Waffle
fd64e17f4c
remove all #[non_exhaustive]
s
2020-08-16 21:24:35 +03:00
Waffle
d186a73eda
add GetUpdatesNonStrict
'telegram' method - fail proof version of GetUpdates
2020-08-16 20:02:12 +03:00
Waffle
f0709a16b3
add changes to CHANGELOG.md
...
(& a bit of fmt 🤦 )
2020-08-16 11:06:50 +03:00
Waffle
f7aef22fbf
make StickerType::{png,tgs}
pub
2020-08-16 10:58:10 +03:00
Waffle
72b776d859
some cleanup (serde_multipart)
2020-08-16 10:53:15 +03:00
Waffle
5afe72b368
rewrite requests to use serde-multipart
...
Rewrite multipart requests to use serde_multipart instead of FromBuilder
2020-08-16 00:21:55 +03:00
Waffle
b303958afd
implement serde multipart serializer
...
Serde multipart serializer can be used to serialize requests
into multipart/form-data without need for copy-paste and boilerplate
2020-08-16 00:21:01 +03:00
Waffle
842a084abf
replace teloxide
with teloxide_core
in doc tests
2020-08-12 20:23:18 +03:00
Waffle
a70cb4e008
Move core code from teloxide
2020-08-12 19:39:40 +03:00