+ tg_get_file
This commit is contained in:
parent
c8f9970487
commit
9b5257313b
5
tg.sh
5
tg.sh
|
@ -62,6 +62,11 @@ function tg_get_me() {
|
||||||
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getMe"
|
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getMe"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# tg_get_file(id)
|
||||||
|
function tg_get_file() {
|
||||||
|
curl -s "${API_URL}/file/bot${TELEGRAM_TOKEN}/$(curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getFile?file_id=$1" | jq -r '.result.file_path')"
|
||||||
|
}
|
||||||
|
|
||||||
# tg_get_messages(offset, timeout)
|
# tg_get_messages(offset, timeout)
|
||||||
function _tg_get_updates() {
|
function _tg_get_updates() {
|
||||||
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getUpdates?offset=$1&timeout=p" | jq -c '.result[]'
|
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getUpdates?offset=$1&timeout=p" | jq -c '.result[]'
|
||||||
|
|
Loading…
Reference in a new issue