jdtrat / chimpr

mailchimp R client
https://sckott.github.io/chimpr/
Other
15 stars 3 forks source link
api api-wrapper json mailchimp-api r rstats

chimpr

Project Status: Active – The project has reached a stable, usable state and is being actively developed. cran checks R-check codecov.io rstudio mirror downloads cran version

Mailchimp API docs API reference

Authentication

Get a Mailchimp API key at https://mailchimp.com/developer/

Keep this key private. You can pass the key in to each function via the key parameter, but it's better to store the key as an environment variable (MAILCHIMP_KEY).

Read only for now

We're sticking to read only (i.e., GET) methods for now.

Package API

The R6 classes ChmpCampaigns, ChmpList, and ChmpReports have methods on them that you can call for various API routes under each high level topic. Generally an id is required (e.g., campaign id, list id, report id), but there are some methods that don't require an id.

High vs. Low level package APIs

High level API

parse to a list or data.frame

Low level API

just get some JSON

Rate Limiting

...

Install

Development version

remotes::install_github("sckott/chimpr")
library("chimpr")

lists

all lists

# JSON
chmp_lists_()
# parse to data.frame where possible
chmp_lists()
# parse to a list
chmp_lists(parse = FALSE)

Meta