-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drv$list_shared_items()
returns list of ms_object
and not list of ms_drive_items
#206
Comments
I think you just sent this via a reply to the email, but just an FYI this
didn't update as a comment on the GitHub issue itself:
#206
…On Tue, Apr 2, 2024 at 2:51 PM dcomputing ***@***.***> wrote:
The public version 2.4.0 does not return a list of ms_drive_items as per
NEWS: The list_shared_items()/list_shared_files() method for drives now
always returns a list of drive item objects
https://cran.r-project.org/web/packages/Microsoft365R/news/news.html
<http://url>
As seen in the 2.4.0 version of the function below, it returns a vector
based on the drive item objects and this causes all code depending on a
list of drive item objects from list_shared_items() to fail since drive
item object functions are no longer available. Whatever happened to issue
#189 <#189> which is
supposed to fix this problem?
list_shared_items=function(allow_external=TRUE, filter=NULL, n=Inf,
pagesize=1000, info=NULL)
{
if(!is.null(info) && info != "items")
warning("Ignoring 'info' argument, returning a list of drive items")
opts <- list(`$top`=pagesize)
if(allow_external)
opts$allowExternal <- "true"
if(!is.null(filter))
opts$`filter` <- filter
children <- self$do_operation("sharedWithMe", options=opts, simplify=FALSE)
# get file list as a data frame, or return the iterator immediately if n is NULL
out <- extract_list_values(self$get_list_pager(children), n)
names(out) <- sapply(out, function(obj) obj$properties$name)
out
}
—
Reply to this email directly, view it on GitHub
<#206 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPO7L6UPIYYQC7O6RPXMPTY3L427AVCNFSM6AAAAABFJS3SPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSHAYTMNZZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry, I deleted the comment I had posted. The code I was dealing with depended on the previous data frame table that had the properti isDir set. I have yet to work out how to handle 2.4.0's list_share_items output. I thought I could call the ms_drive_item's is_folder function but as you say, it is not a list of ms_drive_items. |
Experiencing this issue as well, has a workaround been proposed yet? |
Currently I'm trying to access shared a shared folder, so in order to find the shared folder item I'm using the method
drv$list_shared_items()
. The list that's returned is a list ofms_object
objects.Prior to version, I could use that item directly to access files from within the shared folder using
folder_item$get_item("path")
, but now that the items are classed asms_object
theget_item()
method is not available.In the documentation, it states:
Unfortunately I can't get this to work, because:
drv$get_item()
. Any ID that I try returns a 404.The text was updated successfully, but these errors were encountered: