Following the example in the server API guide I managed to get a response object from the Rstudio Package manager API which contains information about install scripts. I also managed to convert the response into a data frame where one column contains the dependencies install script.
I am wondering if there is a way to send a request to the server that makes it only return values for dependencies? Or if there is a way to filter the response before I turn it into a data frame? My knowledge about API's and the JSON format is limited so this question might be very basic.
Below is an example where create a data frame where one column contains the install scripts for system dependencies for the tidyverse package. Ideally I would like to specify in my request that I only want the system dependencies install scripts.
library(httr)
library(jsonlite)
r <- GET("https://packagemanager.rstudio.com/__api__/repos/1/packages/tidyverse/sysreqs?distribution=ubuntu")
status_code(r)
r_content <- content(r)
r_data <-as.data.frame(fromJSON(content(r, "text")))
Any help is appreciated!