element_texts: Read element texts from an Omeka item

Description Usage Arguments Value Examples

View source: R/element_texts.R

Description

Omeka items as returned by the API have a deeply nested structure. Most of the interesting information is stored in the element texts. This function provides a convenient way of accessing those element texts. Calling this function on an Omeka item returns a named character vector of all the element texts. Optionally you can pass a character vector to filter the output so the function returns only a particular kind of metadata, e.g., "Title".

Usage

1

Arguments

item

An Omeka item as a list

filter

Which element texts to return, as a character vector

Value

A named character vector of element texts

Examples

1
2
3
4
5
6
7
omeka_endpoint("http://20.rrchnm.org/api")
# Get the Papers of the War Department project item
war_dept <- omeka_get("items", 197)
element_texts(war_dept)
element_texts(war_dept, "Title")
element_texts(war_dept, "Content Experts")
element_texts(war_dept, c("Start Date", "End Date"))

lmullen/omekaR documentation built on May 21, 2019, 7:36 a.m.