mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Add docs for method_url
and file_url
This commit is contained in:
parent
d72dae122d
commit
3e0e3ae4b4
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ use super::requests::Request;
|
|||
|
||||
const TELEGRAM_API_URL: &str = "https://api.telegram.org";
|
||||
|
||||
/// Create url for macking requests, see [telegram docs](https://core.telegram.org/bots/api#making-requests)
|
||||
fn method_url(base: &str, token: &str, method_name: &str) -> String {
|
||||
format!(
|
||||
"{url}/bot{token}/{method}",
|
||||
|
@ -18,6 +19,7 @@ fn method_url(base: &str, token: &str, method_name: &str) -> String {
|
|||
)
|
||||
}
|
||||
|
||||
/// Create url for downloading file, see [telegram docs](https://core.telegram.org/bots/api#file)
|
||||
fn file_url(base: &str, token: &str, file_path: &str) -> String {
|
||||
format!(
|
||||
"{url}/file/bot{token}/{file}",
|
||||
|
|
Loading…
Reference in a new issue