MyNixOS website logo
Description

Easily Send Rewards and Incentives with 'Tremendous' from R.

A slightly-opinionated R interface for the 'Tremendous' API (<https://www.tremendous.com/>). In addition to supporting GET and POST requests, 'tremendousr' has, dare I say, tremendously intuitive functions for sending digital rewards and incentives directly from R.

tremendousr

Easily Send Rewards and Incentives from R

R-CMD-check


tremendous is a platform that "empowers companies to buy, track and manage digital and physical payments." This package provides a slightly-opinionated R interface for the 'Tremendous' API with, dare I say, tremendously intuitive functions for sending rewards and incentives directly from R.

Table of contents


Installation

You can install and load the development version of tremendousr from GitHub as follows:

# Install the development version from GitHub
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jdtrat/tremendousr")

# Load package
library(tremendousr)

Getting Started

Tremendous provides two environments for their platform:

  • 'Sandbox' environment, a "free and fully-featured environment for application development and testing."
  • 'Production' environment, where real payments can be sent.

Tremendous API users typically develop their applications against the sandbox environment, and then switch their credentials to production when they are ready to go live.

Unsurprisingly, in order to use this package, you must create a Tremendous account. For the Sandbox environment, you can sign up or log-in here and generate an API key by navigating to Team Settings > Developers and clicking on Add API key on the top right. You can follow the official documentation here.

With an API key, you can create a Tremendous Client in R and send payments as shown below.

test_client <- trem_client_new(api_key = "TEST_YOUR-KEY-HERE",
                               sandbox = TRUE)

trem_send_reward(client = test_client,
             name = "first last",
             email = "[email protected]",
             reward_amount = 10,
             currency_code = "USD",
             delivery_method = "EMAIL",
             payment_description_id = "payment-from-tremendousr-examples",
             funding_source_id = "your-funding-id-from-tremendous",
             reward_types = "Q24BD9EZ332JT", # ID for virtual visa gift card
             parse = TRUE # Return a parsed API response
             )

Further Reading

For a more in-depth explanation of tremendousr, please see the 'Getting Started' Vignette and the official Tremendous API Documentation.

Feedback

If you want to see a feature, or report a bug, please file an issue or open a pull-request! As this package is just getting off the ground, we welcome all feedback and contributions. See our contribution guidelines for more details on getting involved!

Code of Conduct

Please note that the tremendousr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows