An Omeka API client in R

Please see the documentation for the Omeka REST API, as well as information about Omeka itself.


First, make sure you have devtools.


Then, install this package from the GitHub repository.


Basic use

First you must specify the API endpoint for the Omeka site that you are using. This will be stored in an environment variable. (To specify your API key, see ?omeka_key.)


You can get resources using the following function. Here we grab the site information, and a single Omeka item.

site_info <- omeka_get("site")
war_dept <- omeka_get("items", 197)

The item is returned as a list. (If you get multiple items, then they are returned as a list of lists.) Some information about the item is easily accessed.


Most of the interesting information, however, is deeply nested within the list. You can use the following accessor function to get a named character vector of the item's metadata. Optionally you can pass a filter to get only certain kinds of metadata back.

element_texts(war_dept, filter = "Content Experts")
element_texts(war_dept, filter = "Technology Used")

There is a function get_all_items() which will download all the items on an Omeka site, but use this with caution.

lmullen/omekaR documentation built on May 21, 2017, 2:36 p.m.