sendeR is a package whose premise is sending messages to various messaging and/or mailing services using a simple unified interface with as little dependencies as possible.
Package originated as a project for an Advanced R course at a Faculty of Mathematics and Information Science at the Warsaw University of Technology.
To install the development package version from GitHub repository use the following code:
# install.packages("devtools") devtools::install_github("tmakowski/sendeR")
Note: services requiring OAuth2.0 require httr
and openssl
packages installed.
send_message
method on the created client.library("sendeR") my_telegram_client <- client_telegram(<my_bot_token>) send_message(my_telegram_client, "Hello world!", <chat_id>)
As of version 0.9.0.9000
it is possible to set default parameters in the clients as shown below. As of version 0.10.3.9000
it is possible to pass set_fields
arguments directly into client constructor, e.g. client_telegram(<my_bot_token>, message = "Hi world!")
.
client <- client_telegram(<my_bot_token>) client <- set_fields(client, destination = <chat_id>, message = "Hi world!") # This will send "Hi world!" message to chat under <chat_id>. send_message(client) # This will send "Hello world!" message to chat under <chat_id>. send_message(client, message = "Hello world!")
0.10.0.9000
of the package has the sendeR_txtProgressBar
function which shares the behaviour of regular txtProgressBar
with addition of sending a message when calculation is finished. Please refer to the documentation for usage details.0.9.0.9000
of the package comes with the sendeR_lapply
function which can easily be used to send notifications after a calculation is finished. Please refer to the documentation for usage details.client_gmail
pauses code execution and waits for the OAuth2.0 authorization. This can be avoided in subsequent client_gmail
calls if httr
OAuth caching functionality is used.Coming soon...
quick_send_message
- method for sending messages in one line (client creation not required). Note: only for clients not requiring OAuth.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.