R/media.R

Defines functions media_delete media_retrieve media_create media_list

media_list <- function(...) {
  GET("/media", ...)
}

media_create <- function(file, ...) {
  body <- list(
    file = httr::upload_file(file)
  )
  POST("/media", body = body, encode = "multipart", ...)
}

media_retrieve <- function(id, ...) {
  GET("/media/{id}", ...)
}

media_delete <- function(id, ...) {
  DELETE("/media/{id}", ...)
}
shunsambongi/wpr documentation built on Aug. 4, 2020, 12:09 a.m.