Crates.io | telbot-ureq |
lib.rs | telbot-ureq |
version | 0.3.1 |
source | src |
created_at | 2021-11-08 11:19:46.456188 |
updated_at | 2022-03-13 14:45:17.36679 |
description | Telegram API wrapper for ureq client |
homepage | |
repository | https://github.com/kiwiyou/telbot |
max_upload_size | |
id | 478459 |
size | 32,279 |
Telbot provides telegram bot types and API wrappers.
Specifically, telbot now supports:
[dependencies]
telbot-types = "0.3.0"
[dependencies]
telbot-cf-worker = "0.3.0"
[dependencies]
telbot-ureq = "0.3.1"
[dependencies]
telbot-hyper = "0.3.0"
You can implement two methods, send_json
and send_file
with your own http client to create your own API wrapper.
send_json
should serialize JsonMethod
into json format and send it to the API endpoint.
send_file
should serialize FileMethod
into multipart/form-data
format and send it to the API endpoint.
files(&self)
method in FileMethod
helps getting fields of type InputFileVariant
.
For the ease of serializing, both JsonMethod
and FileMethod
implements serde::Serialize
.
TelegramMethod
, the super trait of both JsonMethod
and FileMethod
, provides name()
method,
which can be used to get the method's name in &str
format.
telbot is not a mature project yet, so your help will be very helpful.
Please leave an issue if you find wrongly coded piece or get a nice idea to improve telbot.