Commit graph

177 commits

Author SHA1 Message Date
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
d663879423 fix example and add --features full to ci 2021-01-26 14:52:50 +03:00
Waffle
8807cd7228 fix examples (because get_me now returns Me) 2021-01-26 14:10:37 +03:00
Waffle
a80ff92aba make get_me return Me 2021-01-26 13:58:51 +03:00
Waffle
bfef7f3c5d fix self_info example 2021-01-26 13:43:34 +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
Temirkhan Myrzamadi
53f1c6d4d3
Merge pull request #42 from teloxide/use_2018_module_style
use 2018 module style
2021-01-25 23:33:50 +06:00
Waffle
1f4d29c547 Add note that serde_multipart is awful 2021-01-23 15:59:59 +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
Temirkhan Myrzamadi
592fadfa7d
Merge pull request #40 from teloxide/remove_git_dep
Remove git dependency
2021-01-22 09:17:25 +06:00
Waffle Lapkin
831e7f5c40
Merge pull request #24 from MikailBag/rustls
Support rustls
2021-01-21 23:51:18 +03:00
Waffle
3c70ae5de0 make native-tls default feature 2021-01-21 23:48:04 +03:00
Mikail Bagishov
56f0fc609d fixup 2021-01-21 23:48:04 +03:00
Mikail Bagishov
e289729055 Support rustls
This was teloxide-based applications can be easily compiled for musl
targets.
2021-01-21 23:47:46 +03:00
Waffle
6abf571c96 Remove git dependency 2021-01-21 22:25:20 +03:00
Temirkhan Myrzamadi
8e011b7e60
Merge pull request #41 from teloxide/improve_docs
Improve docs
2021-01-21 18:52:16 +06:00
Waffle
3aec4e5070 fix test 2021-01-21 10:15:02 +03:00
Waffle
cc9e3a56e6 workaround rustc bug 2021-01-21 09:45:20 +03:00
Waffle
b93947c0ab stop using serde internall module 2021-01-15 22:19:42 +03:00
Waffle
84df33dbef improve docs 2021-01-15 22:06:23 +03:00
Waffle
2ee7bb22a1 Move client_from_env from root into net 2021-01-13 16:14:02 +03:00
Waffle
580f50e736 Add very basic example 2021-01-13 16:12:04 +03:00
Waffle
e513cbb453 Add media
(example gif & logo)
2021-01-13 16:10:56 +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
Temirkhan Myrzamadi
9bb3d369f6
Merge pull request #39 from teloxide/forward_requester_impls
Add forward-to-deref Requester impls
2021-01-09 03:38:36 +06:00
Waffle
2ddbaa49ea Add forward-to-deref Requester impls
This commit adds
```rust
impl<B: Requester> Requester for D<B> { ... }
```
where `D<_>` is `&_`, `&mut _`, `Box<_>`, `Arc<_>` and `Rc<_>`.
2021-01-08 22:13:12 +03:00
Temirkhan Myrzamadi
2b13a7b5d0
Merge pull request #38 from teloxide/make_send_dice_emoji_opt
fixup send_emoji method
2021-01-08 03:53:29 +06:00
Waffle
49c3afbc39 fixup send_emoji method 2021-01-08 00:44:19 +03:00
Temirkhan Myrzamadi
3c12e56f8d
Merge pull request #36 from teloxide/norm_docs
Normalize docs
2021-01-07 21:06:15 +06:00
Waffle
d3ecca662b Normalize docs 2021-01-07 18:00:57 +03:00
Temirkhan Myrzamadi
34255d9f0b
Merge pull request #37 from teloxide/update_deps
update deps
2021-01-07 20:55:25 +06:00
Waffle
56d546215a fix clippy: impl From instead of Into 2021-01-07 16:01:46 +03:00
Waffle
71d90002ce update dependencies 2021-01-07 15:58:51 +03:00
Waffle Lapkin
8f3bb9d96b
Merge pull request #35 from teloxide/custom_url
Add `Bot::{set_,}api_url` methods
2020-12-30 17:42:43 +03:00
Waffle
6004d9189c fmt 2020-12-30 17:06:52 +03:00
Waffle Lapkin
114d1c3efb
Update src/bot/mod.rs
Co-authored-by: Temirkhan Myrzamadi <hirrolot@gmail.com>
2020-12-30 17:03:29 +03:00
Waffle
cf3cd63c92 fix doc tests 2020-12-28 21:03:33 +03:00
Waffle
50d3d67f93 fmt 2020-12-28 19:06:46 +03:00
Waffle
f4e3aa13eb Add Bot::{set_,}api_url methods
The methods allow to set and get the Telegram bot API url.
2020-12-28 18:45:45 +03:00
Waffle
9052d4dfbb Remove already fixed FIXMEs 2020-12-28 18:02:04 +03:00
Temirkhan Myrzamadi
42d4c7693a
Merge pull request #34 from teloxide/tgapi_typos
Fix API typos
2020-12-28 18:26:15 +06:00
Waffle
93bc2e6fee Make requester methods doc nicer 2020-12-28 14:57:39 +03:00
Waffle
7cc79eda63 Fix API typos
- Make `caption` args optional
- Add missing game methods
2020-12-28 14:57:37 +03:00
Temirkhan Myrzamadi
7592442624
Merge pull request #32 from teloxide/docs-gardening
Documentation gardening
2020-12-24 02:54:21 +06:00
Temirkhan Myrzamadi
109a5d89ab Satisfy rustfmt 2020-12-23 23:45:56 +06:00
Temirkhan Myrzamadi
957c997161 Merge branch 'docs-gardening' of https://github.com/teloxide/teloxide-core into docs-gardening 2020-12-23 23:41:27 +06:00
Temirkhan Myrzamadi
1188da84e3 Small typo fixes 2020-12-23 23:40:58 +06:00