| RestContainer-class {restfulr} | R Documentation | 
RestContainer
Description
The RestContainer object wraps a collection of resources with a
list-like interface. Values are stored and retrieved
using familiar accessors like [[ and [[<-. Coercion
between external media and R objects is based on the
Media framework.
Data access
The RestContainer object maps familiar R list accessors to CRUD
operations on RestUri.
- 
x[] <- value: Creates resources for the objects invalueatx. This is thecreate/POSToperation. Unlike an R list, the resources are added to the collection without removing any existing resources. This inconsistency is unfortunate, so we might change this behavior in the future. - 
x$name,x[[i]]: Reads the named element. This is theread/GEToperation. - 
x[i]: Reads the named elements, which are returned in a list. This is the vectorizedread/GEToperation. Unlike an R list, this is not an endomorphism, in that the return value is dropped to a list and is no longer attached to the REST interface. - 
x$name <- value,x[[i]] <- value: Updates the named resource withvalue. This is theupdate/PUToperation. - 
x[i] <- value: Updates resources atxwith the objects invalue, a list. This is the vectorizedupdate/PUToperation. - 
x$name <- NULL,x[[i]] <- NULL: Deletes the named resource. This is thedelete/DELETEoperation. 
Constructor
RestContainer(...): Constructs an instance based onRestUri(...).
Author(s)
Michael Lawrence
See Also
RestUri, which is a lower-level but perhaps more
sensible interface.
Examples
apache <- RestContainer("http://wiki.apache.org")
apache$solr