Docs (or helper functions?) on consuming Plumber APIs in R, Shiny and RMarkdown/Quarto #901
Labels
difficulty: intermediate
Enterprising community members could help
docs
Related to documentation only
effort: low
< 1 day of work
help wanted
Solution is well-specified enough that any community member could fix
I've been trying to explain to people inside my team how we will use Plumber APIs inside our other R code.
So far we've used a fork copy of [https://github.com/bergant/rapiclient] with some auth additions which I think will make R calling plumber APIs pretty straight-forward.
I am, however, struggling a bit with "good practice" when it comes to consuming anything except text and JSON inside e.g. Shiny and RMarkdown.
For example, I've been trying to use a PNG plot output today in a Shiny app. I've coded that into an app which an imageOutput like:
Note: I know this isn't optimal... still plenty to tweak and experiment with - would like to get the file saving direct into the httr::GET ideally... just fighting the rapiclient wrapper
The feature request here is: I think it'd be useful for the plumber docs to have a section on how to make Shiny apps and markdowns that interally use plumber requests for json data, for png's, for svg's and for htmlwidget's...
I also think it might be useful to add some helper functions to some library somewhere too - e.g. most of the above renderImage could be hidden away I think (especially if #897 provides a standard way of specifying image sizes)
The text was updated successfully, but these errors were encountered: