Getting started

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(knitr)

This vignette describes how to get started using the opencastR package.

Setup

In order to use the opencastR package the hostname of your Opencast server, your username and password need to be set as environment variables. For this example I use the Legacy Opencast Testserver and the default credentials.

library(opencastR)

Sys.setenv(OPENCAST_HOST = "https://legacy.opencast.org")
Sys.setenv(OPENCAST_USERNAME = "admin")
Sys.setenv(OPENCAST_PASSWORD = "opencast")

First call

To check if everything is setup correctly the oc_api function can be used which returns the default api version and the server url.

oc_api()

The return of this functions shows that a list of the class opencast_api has been returned. This list contains three elements. The content, the url that was called and the full response. So access only the content we can do the following.

api_test <- oc_api()
api_test$content

Events

To showcase a more useful functions a list of events on the testserver can be retrieved.

events <- oc_list_events()
kable(events$content)


Try the opencastR package in your browser

Any scripts or data that you put into this service are public.

opencastR documentation built on March 19, 2020, 5:12 p.m.