R/quickfs_quota.R

Defines functions quickfs_quota

Documented in quickfs_quota

#' Get the quota from quickfs
#'
#' @examples
#'
#' quickfs_quota()
#'
quickfs_quota <- function(){
  # url
  url = "https://public-api.quickfs.net/v1/usage"
  # send request
  response = GET(url, add_headers("X-QFS-API-Key" = quickfs_key))
  # parse response
  quota = content(response)$usage$quota$remaining
  # return
  return(quota)
}
montecapital/financer documentation built on Jan. 13, 2022, 5:46 a.m.