ChmpList: Lists class

Description Public fields Methods Note Examples

Description

Lists class

Lists class

Public fields

conn

(character) a connection object, see ChmpClient

id

(character) an id

Methods

Public methods


Method new()

Create a new ChmpList object

Usage
ChmpList$new(conn, id)
Arguments
conn

a connection object. see ChmpClient

id

(character) a mailchimp list id. required

Returns

A new ChmpList object


Method print()

print method for ChmpList objects

Usage
ChmpList$print(x, ...)
Arguments
x

self

...

ignored


Method info()

Get list info

Usage
ChmpList$info(
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method activity()

List activity

Usage
ChmpList$activity(
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method abuse_reports()

List abuse reports

Usage
ChmpList$abuse_reports(
  report = NULL,
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
report

(character) a report id

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method clients()

List clients

Usage
ChmpList$clients(
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method growth_history()

Growth history

Usage
ChmpList$growth_history(
  month = NULL,
  fields = NULL,
  exclude_fields = NULL,
  count = 10,
  offset = 0,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
month

(character) a year/month character string of the year/month you want. optional

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

count

(integer/numeric) The number of records to return. Default value is 10.

offset

(integer/numeric) The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method interest_categories()

Interest categories

Usage
ChmpList$interest_categories(
  category_id = NULL,
  fields = NULL,
  exclude_fields = NULL,
  count = 10,
  offset = 0,
  type = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
category_id

(character) a category id

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

count

(integer/numeric) The number of records to return. Default value is 10.

offset

(integer/numeric) The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.

type

(character) a type

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method locations()

Locations

Usage
ChmpList$locations(
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method member()

Info for a specific list member

Usage
ChmpList$member(
  subscriber_hash,
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
subscriber_hash

(character) a subscriber hash identifying a subscriber

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method member_activity()

Activity for a specific list member

Usage
ChmpList$member_activity(
  subscriber_hash,
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
subscriber_hash

(character) a subscriber hash identifying a subscriber

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method member_goals()

Goals for a specific list member

Usage
ChmpList$member_goals(
  subscriber_hash,
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
subscriber_hash

(character) a subscriber hash identifying a subscriber

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method member_notes()

Notes for a specific list member

Usage
ChmpList$member_notes(
  subscriber_hash,
  fields = NULL,
  exclude_fields = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
subscriber_hash

(character) a subscriber hash identifying a subscriber

fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method members()

Members info

Usage
ChmpList$members(
  fields = NULL,
  exclude_fields = NULL,
  count = 10,
  offset = 0,
  email_type = NULL,
  status = NULL,
  since_timestamp_opt = NULL,
  before_timestamp_opt = NULL,
  since_last_changed = NULL,
  before_last_changed = NULL,
  unique_email_id = NULL,
  vip_only = NULL,
  interest_category_id = NULL,
  interest_ids = NULL,
  interest_match = NULL,
  key = NULL,
  parse = TRUE,
  ...
)
Arguments
fields

(list/vector) A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

exclude_fields

(list/vector) A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

count

(integer/numeric) The number of records to return. Default value is 10.

offset

(integer/numeric) The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.

email_type

an email type

status

a status value

since_timestamp_opt

time stamp since

before_timestamp_opt

time stamp before

since_last_changed

since last changed

before_last_changed

before last changed

unique_email_id

a unique email id

vip_only

vip only?

interest_category_id

an interest category id

interest_ids

interest ids

interest_match

an interest match

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient


Method clone()

The objects of this class are cloneable with this method.

Usage
ChmpList$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Note

not all routes are implemented thus far

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
(conn <- ChmpClient$new())
(x <- ChmpList$new(conn, id = "<id>"))
x$info()
x$info(parse = FALSE)
x$info(fields = "stats")
x$info(fields = "stats.open_rate")
x$info(fields = "campaign_defaults")
x$activity()
x$abuse_reports()
x$clients()
x$growth_history()
x$growth_history("2018-02")
x$interest_categories()
x$locations()
x$members()
# x$member("<id>")
# x$member_activity("<id>")
# x$member_goals("<id>")
# x$member_notes("<id>")

## End(Not run)

sckott/chimpr documentation built on Sept. 17, 2021, 11:04 a.m.