ms_sharepoint_list: Sharepoint list

Description Format Fields Methods Initialization List querying See Also Examples

Description

Class representing a list in a SharePoint site.

Format

An R6 object of class ms_sharepoint_list, inheriting from ms_object.

Fields

Methods

Initialization

Creating new objects of this class should be done via the get_list method of the ms_site 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.

List querying

list_items supports the following arguments to customise results returned by the query.

For more information, see Use query parameters at the Graph API reference. Due to current limitations in the Microsoft Graph REST API version 1.0, you can only read data from lists, not write to them.

See Also

sharepoint_site, ms_site

Microsoft Graph overview, SharePoint sites API reference

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

site <- sharepoint_site("https://mycompany.sharepoint.com/sites/my-site-name")
lst <- site$get_list("mylist")

lst$get_column_info()

lst$list_items()
lst$list_items(filter="startswith(fields/firstname, 'John')", select="firstname,lastname")


## End(Not run)

hongooi73/SharePointR documentation built on Jan. 7, 2021, 10:42 p.m.