This commit is contained in:
Hong Ooi 2021-06-10 12:50:40 +10:00
Родитель 2d7d43a26d
Коммит aadc39dda6
6 изменённых файлов: 55 добавлений и 9 удалений

Просмотреть файл

@ -1,6 +1,6 @@
Package: Microsoft365R
Title: Interface to the 'Microsoft 365' Suite of Cloud Services
Version: 2.2.0
Version: 2.2.1
Authors@R: c(
person("Hong", "Ooi", , "hongooi73@gmail.com", role = c("aut", "cre")),
person("Roman", "Zenka", role="ctb"),

Просмотреть файл

@ -9,6 +9,7 @@ export(get_sharepoint_site)
export(get_team)
export(list_sharepoint_sites)
export(list_teams)
export(make_basic_list)
export(ms_channel)
export(ms_chat_message)
export(ms_drive)

Просмотреть файл

@ -1,3 +1,7 @@
# Microsoft365R 2.2.1
- Hotfix for `could not find function "make_basic_list"` error when calling `list_*` methods and functions (#58, #56).
# Microsoft365R 2.2.0
## OneDrive/SharePoint

Просмотреть файл

@ -77,14 +77,6 @@ utils::globalVariables(c("self", "private"))
error_message <- get("error_message", getNamespace("AzureGraph"))
get_confirmation <- get("get_confirmation", getNamespace("AzureGraph"))
make_basic_list <- function(object, op, filter, n, ...)
{
opts <- list(`$filter`=filter)
hdrs <- if(!is.null(filter)) httr::add_headers(consistencyLevel="eventual")
pager <- object$get_list_pager(object$do_operation(op, options=opts, hdrs), ...)
extract_list_values(pager, n)
}
# dummy mention to keep CRAN happy
# we need to ensure that vctrs is loaded so that AzureGraph will use vec_rbind
# to combine paged results into a single data frame: individual pages can have

20
R/make_basic_list.R Normal file
Просмотреть файл

@ -0,0 +1,20 @@
#' Create a list of Graph objects
#' @param object An R6 object inheriting from `AzureGraph::ms_object`.
#' @param op A string, the REST operation.
#' @param filter,n Filtering arguments for the list.
#' @param ... Arguments passed to lower-level functions, and ultimately to `AzureGraph::call_graph_endpoint`.
#' @details
#' This function is a basic utility called by various Microsoft365R class methods. It is exported to work around issues in how R6 handles classes that extend across package boundaries. It should not be called by the user.
#' @return
#' If `n` is NULL, an iterator object, of class `AzureGraph::ms_graph_pager`. Otherwise, a list of individual Graph objects.
#' @seealso
#' [`AzureGraph::call_graph_endpoint`], [`AzureGraph::ms_graph_pager`]
#' @export
make_basic_list <- function(object, op, filter, n, ...)
{
opts <- list(`$filter`=filter)
hdrs <- if(!is.null(filter)) httr::add_headers(consistencyLevel="eventual")
pager <- object$get_list_pager(object$do_operation(op, options=opts, hdrs), ...)
extract_list_values(pager, n)
}

29
man/make_basic_list.Rd Normal file
Просмотреть файл

@ -0,0 +1,29 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_basic_list.R
\name{make_basic_list}
\alias{make_basic_list}
\title{Create a list of Graph objects}
\usage{
make_basic_list(object, op, filter, n, ...)
}
\arguments{
\item{object}{An R6 object inheriting from \code{AzureGraph::ms_object}.}
\item{op}{A string, the REST operation.}
\item{filter, n}{Filtering arguments for the list.}
\item{...}{Arguments passed to lower-level functions, and ultimately to \code{AzureGraph::call_graph_endpoint}.}
}
\value{
If \code{n} is NULL, an iterator object, of class \code{AzureGraph::ms_graph_pager}. Otherwise, a list of individual Graph objects.
}
\description{
Create a list of Graph objects
}
\details{
This function is a basic utility called by various Microsoft365R class methods. It is exported to work around issues in how R6 handles classes that extend across package boundaries. It should not be called by the user.
}
\seealso{
\code{\link[AzureGraph:call_graph]{AzureGraph::call_graph_endpoint}}, \code{\link[AzureGraph:ms_graph_pager]{AzureGraph::ms_graph_pager}}
}