diff options
author | Guillermo Ramos | 2019-06-30 13:46:45 +0200 |
---|---|---|
committer | Guillermo Ramos | 2019-06-30 13:46:45 +0200 |
commit | 428615368f7c3c69ad415859162a432cf0866458 (patch) | |
tree | 0677b7a5657f155cce38129dd7708216fe830dee | |
parent | 95faae2a4d687a189127621faaeecf17a040c3eb (diff) | |
download | tgutils-428615368f7c3c69ad415859162a432cf0866458.tar.gz |
Add examples to documentation
-rwxr-xr-x | tgrecv | 5 | ||||
-rwxr-xr-x | tgsend | 5 | ||||
-rwxr-xr-x | tgserver | 5 |
3 files changed, 15 insertions, 0 deletions
@@ -126,6 +126,11 @@ I<token>, and outputs it as a JSON array. The array can contain multiple updates. The connection is blocking (long polling), so it waits until an update is available before exiting. +=head1 EXAMPLE + + tgrecv --auto-offset --token 123456789:abcdefghijklmnopqrstuvwxyzABCDEFGHI \ + | jq .[0].message + =head1 AUTHENTICATION To get the bot token, this program will check (in order): @@ -96,6 +96,11 @@ Show this message This program will send its standard input to the given Telegram I<chat_ids>, from the bot identified by I<token>. +=head1 EXAMPLE + + echo "Hello, word!" + | tgsend --token 123456789:abcdefghijklmnopqrstuvwxyzABCDEFGHI 12121212 \ + =head1 AUTHENTICATION To get the bot token, this program will check (in order): @@ -107,6 +107,11 @@ This program waits for Telegram updates from the bot identified by I<token>. For every update it runs I<prog> with stdin piped to the update, and sending stdout back as response. +=head1 EXAMPLE + + tgserver --token 123456789:abcdefghijklmnopqrstuvwxyzABCDEFGHI -- \ + cowsay -f moofasa + =head1 AUTHENTICATION To get the bot token, this program will check (in order): |