mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update apihelper.py
This commit is contained in:
parent
0422e62f65
commit
ff3cbaf45b
@ -98,6 +98,11 @@ def get_file(token, file_id):
|
|||||||
return _make_request(token, method_url, params={'file_id': file_id})
|
return _make_request(token, method_url, params={'file_id': file_id})
|
||||||
|
|
||||||
|
|
||||||
|
def get_file_url(token, file_id):
|
||||||
|
method_url = r'getFile'
|
||||||
|
return FILE_URL.format(token, types.File.de_json(_make_request(token, method_url, params={'file_id': file_id})).file_path)
|
||||||
|
|
||||||
|
|
||||||
def download_file(token, file_path):
|
def download_file(token, file_path):
|
||||||
url = FILE_URL.format(token, file_path)
|
url = FILE_URL.format(token, file_path)
|
||||||
result = _get_req_session().get(url)
|
result = _get_req_session().get(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user