R/SharepointR.R

Defines functions .onLoad

#' @import AzureGraph
NULL

utils::globalVariables(c("self", "private"))

.onLoad <- function(libname, pkgname)
{
    register_graph_class("site", ms_site,
        function(props) grepl("sharepoint", props$id, fixed=TRUE))

    register_graph_class("drive", ms_drive,
        function(props) !is_empty(props$driveType) && is_empty(props$parentReference))

    register_graph_class("driveItem", ms_drive_item,
        function(props) !is_empty(props$parentReference$driveId))

    register_graph_class("list", ms_sharepoint_list,
        function(props) !is_empty(props$list))

    add_methods()
}

# default authentication app ID: leverage the az CLI
.az_cli_app_id <- "04b07795-8ddb-461a-bbee-02f9e1bf7b46"

# authentication app ID for personal accounts
.azurer_graph_app_id <- "5bb21e8a-06bf-4ac4-b613-110ac0e582c1"
hongooi73/SharePointR documentation built on Jan. 7, 2021, 10:42 p.m.