Closed monkeywithacupcake closed 1 year ago
You misunderstand, there is no method to create a new list. You can retrieve ONE list with get_list
, or all the lists with get_lists
(which should really be list_lists
to be consistent with other method names, but that would sound dumb). Passing a nonexistent name to get_list
will error out as you found.
Thanks for the clarification - I didn't think it was possible, but then I kept reading the "initialization" sections for various items, and I thought...maybe this is just a very obfuscated method.
For future people, who may have gotten too excited, like me, initialization in the code here means for your R session, not for MS365.
If you use get_list()
or get_site()
or get_whatever()
it will create an object in R of that class (list, environment, etc) not create an object on the MS365 platform.
The documentation on ms_list says to create a new list you use the
get_list
method of the site class. However, if I callsite$get_lists()
without a valid, existing list name or id, I get an error.Assume that I am authenticated, and I can effectively call
site$get_lists()
# with no errorI expected that calling
site$get_list("some new name")
ORsite$get_list(list_name = "some new name")
would create a new list, based on the documentation, but either it is broken, or I misunderstand. I assume the latter.
The error that I get in both cases is: