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.
- Create a client for one of the supported services. For details on how to get access to the service’s API please refer to given client’s documentation.
- Use
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>)
- Creating
client_gmail
pauses code execution and waits for the OAuth2.0 authorization. This can be avoided in subsequentclient_gmail
calls ifhttr
OAuth caching functionality is used. - Currently (
v0.5.0
) passing an argument of wrong type to any function will result in a code stop due to failed assertion. Please test your sendeR calls before running long calculations.
Coming soon…
quick_send_message
- method for sending messages in one line (client creation not required). Note: only for clients not requiring OAuth.- Searching system environment for required parameters during clients’ construction if they are missing.