Nothing
#' Query Opencast default api versions
#'
#' Returns a list containing the default api version.
#'
#' This function expects the hostname, username and password to be set as environment variables.
#'
#' @return A list containing the default api version.
#' @importFrom httr modify_url
#' @export
#' @examples
#' Sys.setenv(OPENCAST_HOST = "https://legacy.opencast.org")
#' Sys.setenv(OPENCAST_USERNAME = "admin")
#' Sys.setenv(OPENCAST_PASSWORD = "opencast")
#'
#' oc_version_default()
oc_version_default <- function() {
# Set the url path
path <- "/api/version"
# Construct the url for the api call
url <- modify_url(oc_hostname(), path = path)
# Query the api and return the response
oc_package_query(url)
}
#' Print result of oc_version_default()
#'
#' Print a structured return of the oc_version_default() function.
#'
#' @param x The return of the function this print function relates to.
#' @param ... Possible further options to the print function.
#' @return A structured print of the return by the oc_version_default() function.
#' @seealso \code{\link{oc_version_default}}
#' @importFrom utils str
#' @export
#' @examples
#' Sys.setenv(OPENCAST_HOST = "https://legacy.opencast.org")
#' Sys.setenv(OPENCAST_USERNAME = "admin")
#' Sys.setenv(OPENCAST_PASSWORD = "opencast")
#'
#' resp <- oc_version_default()
#'
#' resp
print.oc_version_default <- function(x, ...) {
cat("<Opencast ", x$path, ">\n", sep = "")
str(x$content)
invisible(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.