SharePoint list item
Class representing an item in a SharePoint list.
An R6 object of class ms_list_item
, inheriting from ms_object
.
token
: The token used to authenticate with the Graph host.
tenant
: The Azure Active Directory tenant for the parent drive.
type
: always "drive item" for a drive item object.
properties
: The item properties (metadata).
new(...)
: Initialize a new object. Do not call this directly; see 'Initialization' below.
delete(confirm=TRUE)
: Delete this item. By default, ask for confirmation first.
update(...)
: Update the item's properties (metadata) in Microsoft Graph. To update the list data, update the fields
property. See the examples below.
do_operation(...)
: Carry out an arbitrary operation on the item.
sync_fields()
: Synchronise the R object with the item metadata in Microsoft Graph.
Creating new objects of this class should be done via the get_item
method of the ms_list
class. Calling the new()
method for this class only constructs the R object; it does not call the Microsoft Graph API to retrieve or create the actual item.
## Not run: site <- get_sharepoint_site("My site") lst <- site$get_list("mylist") lst_items <- lst$list_items(as_data_frame=FALSE) item <- lst_items[[1]] item$update(fields=list(firstname="Mary")) item$delete() ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.