Changing Access Types in Updated connectapi

Hello!

I've spent some time looking through documentation and can't quite find the answer to this question.

In earlier versions of RSC and connectapi, I was able to create an app and update the access type to "all" doing the following:

    myapp <- connectapi::deploy(client, bnd)
    myapp$update(access_type = 'all')

This throws an error now. Is there an updated function/place to update that I'm missing/can't find?

Thanks!

connectapi version: 0.1.0.9020
RSC version: 1.7.8-7

Hello @davisderodes ! And welcome to the community!

Apologies for the trouble! You are right - in 0.1.0.9018, we switched myapp$update() to use a PATCH verb (which was added in 1.8.6) :frowning:

Double unfortunately, we do not clearly tag our versions (yet) :see_no_evil: In any case, I used git blame to track back to when we bumped to 0.1.0.9017, which was here: 44afb9519aad08524b7bd162bc778355aa54dfa0

So the following may get you resolved?

remotes::install_github("rstudio/connectapi@44afb9519a")

Alternatively, you can look at the source from that version:

(Although ugh.. it looks like we may not have kept close eye on our versions :grimacing: )

And issue your own myapp$get_connect()POST() using the old pattern.

This is the source from the old version:

   update = function(...) {
     params <- rlang::list2(...)
     url <- glue::glue("v1/experimental/content/{self$get_content()$guid}")
     res <- self$get_connect()$POST(
       url,
       params
     )
     return(self)
   },

Apologies for the trouble! I definitely recommend updating Connect when you get a chance - lots of good new APIs to work with!! (Although we are a bit behind implementing them in connectapi, to be honest :see_no_evil: )

Hey Cole! No problem! Thanks for your prompt response.

I knew downloading an older version of connectapi would also solve the issue (so thank you for pointing me in the right direction to download it!)

Thanks!

1 Like