jdtrat / chimpr

mailchimp R client
https://sckott.github.io/chimpr/
Other
15 stars 3 forks source link

parameter count not working #5

Closed brucefeiwang closed 2 years ago

brucefeiwang commented 4 years ago
list <- ChmpList$new(conn, count = 10,id = "*****")

Error in .subset2(public_bind_env, "initialize")(...) : unused argument (count = 10)

sckott commented 4 years ago

thanks for the issue. sorry the error isn' tthe most useful, but it does correctly state that you've used an unused argument, meaning $new() doesn't accept that arg

are you familiar with R6 classes?

We use those in this package. the $new() method on each class accepts only certain parameters to initialize the classs, and then methods on the class accept a different set of parameters, although they can share parameters too.

Here's the docs for chimpr: https://sckott.github.io/chimpr/

The docs for ChmpList https://sckott.github.io/chimpr/reference/ChmpList.html - The $new() method accepts the params conn and id. The count param can be passed to some of the methods

brucefeiwang commented 2 years ago

Thanks!