This vignette describes how to get started using the opencastR package.
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.
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()
#> $content
#> $content$version
#> [1] "v1.2.0"
#>
#> $content$url
#> [1] "http://localhost:8080/api"
#>
#>
#> $url
#> [1] "https://legacy.opencast.org/api/"
#>
#> $response
#> Response [https://legacy.opencast.org/api/]
#> Date: 2019-10-29 15:12
#> Status: 200
#> Content-Type: application/json
#> Size: 57 B
#>
#>
#> attr(,"class")
#> [1] "opencast_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.
To showcase a more useful functions a list of events on the testserver can be retrieved.
identifier | creator | presenter | created | is_part_of | subjects | start | description | language | source | title | processing_state | license | archive_version | contributor | series | has_previews | location | rightsholder | publication_status | status |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dbb56a4e-8f97-48f7-9ae4-bbaa134f5137 | System User | Durian Open Movie Team | 2019-10-29T01:06:00Z | 251e807b-7d0f-4d71-a1a8-1e28281109f3 | list() | 2019-10-29T01:06:21Z | Trailer for the Sintel open movie project | Sintel Trailer | SUCCEEDED | 1 | list() | Blender Foundation Productions | TRUE | c(“internal”, “engage-player”, “oaipmh-default”) | EVENTS.EVENTS.STATUS.PROCESSED | |||||
d5d8a9cb-1650-476f-883b-cc0511fc5597 | System User | Lars Kiesow | 2019-10-29T01:05:00Z | list() | 2019-10-29T01:05:54Z | Opencast quick Jira ticket and pull request creator, https://github.com/lkiesow/ocpr | OCPR Demo | SUCCEEDED | 1 | list() | TRUE | c(“internal”, “engage-player”, “oaipmh-default”) | EVENTS.EVENTS.STATUS.PROCESSED | |||||||
0d2ca3e0-42f2-43ea-b716-e16dfacff3c8 | System User | Olaf Schulte | 2019-10-29T01:05:00Z | list() | 2019-10-29T01:05:54Z | About Opencast | SUCCEEDED | 1 | list() | TRUE | c(“internal”, “engage-player”, “oaipmh-default”) | EVENTS.EVENTS.STATUS.PROCESSED | ||||||||
9184505e-dc82-44b2-9200-11b94adff9ca | System User | Blender Foundation | 2019-10-29T01:05:00Z | 251e807b-7d0f-4d71-a1a8-1e28281109f3 | list() | 2019-10-29T01:06:07Z | Tears of Steel | SUCCEEDED | 1 | list() | Blender Foundation Productions | TRUE | c(“internal”, “engage-player”, “oaipmh-default”) | EVENTS.EVENTS.STATUS.PROCESSED | ||||||
58384f85-bf1c-46cc-a96b-e3e4963d7bc9 | System User | Blender Foundation | 2019-10-29T01:06:00Z | 251e807b-7d0f-4d71-a1a8-1e28281109f3 | list() | 2019-10-29T01:06:20Z | Tears of Steel (Dualstream) | SUCCEEDED | 1 | list() | Blender Foundation Productions | TRUE | c(“internal”, “engage-player”, “oaipmh-default”) | EVENTS.EVENTS.STATUS.PROCESSED |