Waffle Lapkin
a7a329a53a
Merge pull request #65 from teloxide/refactor_reply_markup
...
refactor reply markup
2021-03-16 15:32:11 +03:00
Waffle
36557573aa
Refactor ReplyMarkup
...
This commit tries to make using ReplyMarkup less noisy. It
- Renames `ReplyMarkup::{InlineKeyboardMarkup => InlineKeyboard, ReplyKeyboardMarkup => Keyboard, ReplyKeyboardRemove => KeyboardRemove}`
- Adds `inline_kb`, `keyboad`, `kb_remove` and `force_reply` `ReplyMarkup`
consructors
- Renames `ReplyKeyboardMarkup` => `KeyboardMarkup`
- Renames `ReplyKeyboardRemove` => `KeyboardRemove`
- Removes useless generic param from `ReplyKeyboardMarkup::new` and
`InlineKeyboardMarkup::new`
- Changes parameters order in `ReplyKeyboardMarkup::append_to_row` and
`InlineKeyboardMarkup::append_to_row`
2021-03-16 15:14:32 +03:00
Waffle Lapkin
510b0c9ac0
Make MediaContact::contact public
2021-03-16 14:16:40 +03:00
Waffle
aef88f97c3
Update to tba API version 5.1
2021-03-15 23:50:02 +03:00
Waffle
9abb6d6884
Small fixes
2021-03-14 23:18:07 +03:00
Waffle
20c67a18c5
Update types (tba API 5.0)
...
See more: https://core.telegram.org/bots/api#november-4-2020
2021-03-14 22:52:35 +03:00
Temirkhan Myrzamadi
e400fb16e7
Use serde_json::from_value in Update::try_parse
2021-03-13 21:38:05 +06:00
Temirkhan Myrzamadi
cd9a98163c
Fix SemiparsedVec::from
2021-03-13 21:11:54 +06:00
Temirkhan Myrzamadi
32b446d26c
Move log::error! on update parsing failure to Update::try_parse
2021-03-13 21:05:45 +06:00
Temirkhan Myrzamadi
61eed38c32
Fix SemiparsedVec
2021-03-13 17:46:16 +06:00
Temirkhan Myrzamadi
c2aaa724f4
NonStrictVec -> SemiparsedVec
2021-02-27 18:52:11 +06:00
Waffle
417b8eb1e1
Add #[non_exhaustive]
on InputFile
2021-02-16 17:16:27 +03:00
Waffle
8abf3863e5
Future proof multipart requests
2021-02-16 17:16:20 +03:00
Temirkhan Myrzamadi
3129d709fe
Small enhancements
2021-02-15 16:46:31 +06:00
Temirkhan Myrzamadi
3485acb2b4
Merge pull request #47 from teloxide/update_changelog
...
update changelog
2021-02-15 11:43:57 +03:00
Waffle
91220befb6
fix warning
2021-02-15 00:35:53 +03:00
Waffle
ab76ec07f2
fix docs
2021-02-07 02:41:29 +03:00
Waffle
fc88c72a26
Suppress clippy::upper_case_acronyms for Currency and CountryCode
2021-02-06 19:25:36 +03:00
Waffle
8befcffe26
Fix naming that triggers clippy::upper_case_acronyms lint
...
Rename
- ParseMode::{HTML => Html}
- ApiError::{
InvalidQueryID => InvalidQueryId,
ButtonURLInvalid => ButtonUrlInvalid,
WrongFileID => WrongFileId,
WebhookRequireHTTPS => WebhookRequireHttps,
WrongHTTPurl => WrongHttpUrl,
}
2021-02-06 19:23:16 +03:00
Waffle
311a5b18fe
fix docs
2021-01-26 18:39:10 +03:00
Waffle
0e43c32b82
clippy
2021-01-26 18:31:15 +03:00
Waffle
eaf72bd97d
remove unused function
2021-01-26 16:53:49 +03:00
Waffle
a26935d51a
remove SendInvoice from types
...
- It's a method not a telegram type
- We already have SendInvoice ~at home~ in payloads
Existence of the file was an accident
2021-01-26 16:46:34 +03:00
Waffle
0ef0526743
Replace Into<Vec<_>>
by IntoIterator<Item = _>
2021-01-26 16:34:22 +03:00
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