sp_site {tntpr} | R Documentation |
Return Microsoft365R site or drive object
Description
Pulls the site or drive (if given) or returns the stored default. Useful if you need to use methods that aren't currently wrapped by tntpr
Usage
sp_site(site = NULL)
sp_drive(drive = NULL, site = NULL)
Arguments
site |
Site identifier. Can be the site name, id, URL, or an ms_site object. If no site identifier is provided, uses the stored default site if it exists. |
drive |
Drive identifier. Can be the drive name, id, or an ms_drive object. If site is provided but drive is not, uses the first drive of the provided site. If neither is provided, uses the stored default drive if it exists. |
Value
A Microsoft365R site object or drive object
See Also
Microsoft365R::ms_site, Microsoft365R::ms_drive
Examples
# Get current default site or drive
x <- sp_site()
y <- sp_drive()
# Get specified site or drive
x <- sp_site("Data Analytics")
y <- sp_drive("Documents") # Uses stored default site
y <- sp_drive("Documents", site = "Data Analytics") # Use provided site
# Use additional methods in the site/drive objects
x$get_lists()
y$get_item_properties("Analysis Tools.docx")
[Package tntpr version 1.2.1 Index]