Items retrieved from OSF are represented as osf_tbl
objects, specialized
data frames based on the tibble class. See below
for additional details.
osf_tbl
is the parent class of 3 subclasses that are used to represent
each of OSF's main entities:
osf_tbl_user
for users.
osf_tbl_file
for files and directories.
osf_tbl_node
for projects and components.
Projects and components are both implemented as nodes on OSF. The only
distinction between the two is that a project is a top-level node, and a
component must have a parent node (i.e., must be a sub-component of another
project or component). Because projects and components are functionally
identical, osfr uses the same osf_tbl_node
class to represent both.
Our implementation of the osf_tbl
class is based on dribble
objects from
the googledrive package.
Each row of an osf_tbl
represents a single OSF entity, which could be a
user, project, component, directory, or file. An osf_tbl
must include
the following 3 variables:
name
: the name or title of the entity.
id
: the unique identifier assigned to the entity.
meta
: a list-column that stores the processed response returned by OSF's
API.
The meta
column is primarily intended for use by osfr
's functions and
should not be altered by users.