rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Preview page code snippet #553

Closed sellorm closed 2 years ago

sellorm commented 2 years ago

The code snippet is very useful, but doesn't work out of the box

library(pins)
board <- board_rsconnect(server = "https://utah.company.com/rsc")
#> Error: `server` must be one of "cheddar", "utah.company.com", or "connect.companyservices.com".
pin_read(board, "mark.sellors/palmer_penguins")
#> Error in check_board(board, "pin_read()", "pin_get()"): object 'board' not found

Created on 2021-11-05 by the reprex package (v2.0.1)

It would be great if it did, or, if that's not possible, a brief explanation of the required parameters of a template snippet could be provided instead.

hadley commented 2 years ago

Do we expect people to generally auth with envvar or rsconnect (assuming I fix #567)? i.e. which of the following would it be better to generate?

board <- board_rsconnect("envvar", server = "https://utah.company.com/rsc")
board <- board_rsconnect("rsconnect", server = "utah.company.com")

cc @juliasilge

sellorm commented 2 years ago

Judging from the examples people have shared in other issues, I'd have to vote for "envvar".

juliasilge commented 2 years ago

I agree with @sellorm about "envvar" being the better option here for folks, based on what we already see people using and based on how people are encouraged to set up content on Connect in its docs.

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.