README.md

msapi

An R package for simple, flexible REST API calls to MS Office Graph and SharePoint.

Installation

library(devtools)
install_github("brendan-newlon/msapi")
library(msapi)

SP

This function allows R to send normally constructed SharePoint queries and return the response as a simple data.frame.

Arguments

Examples

ListItems <- SP("https://{TENANT}.sharepoint.com/sites/_api/Web/Lists(guid'{LIST ID}')/Items", 
Username = "{USER EMAIL}")

You can use pipes for a clearer view of your queries:

ListItems <- "https://{TENANT}.sharepoint.com/sites/_api/Web/Lists(guid'{LIST ID}')/Items" %>% 
SP(Username = "{USER EMAIL}")

For more information about how to construct queries, see the SharePoint REST API documentation or to further refine your queries, see the OData documentation

MSGraph

This function allows R to send normally constructed MS Office Graph queries and return the response as a simple data.frame.

For more information about how to construct queries, see the Office Graph Developer Demo or to further refine your queries, see the OData documentation

Arguments

Examples

User_IDs <- MSGraph("https://graph.microsoft.com/v1.0/users?$select=id")

User_IDs <- "https://graph.microsoft.com/v1.0/users?$select=id" %>% MSGraph()

Acknowledgements

Many thanks to LukasK13. I learned (and wholesale copied some chunks of code) from his sharepointr package.



brendan-newlon/msapi documentation built on April 20, 2020, 1:57 a.m.