-
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
Add new ms_drive_item
methods for item version history, analytics, retention labels, etc.
#188
Comments
Going from that last link, this should get you the history:
Is that what you're after? Basically |
This is exactly what I wanted to do, @hongooi73. I didn't quite realize it was so simple to use the |
That would be great! I recommend looking at the AzureGraph vignettes if you want to make a PR, there is a short intro on extending the object framework. |
Is this the vignette you are thinking of, @hongooi73? It looks like there are a couple different API endpoints related to item changes, usage, retention, and versioning:
If it works for you, I may change the title of this issue to something a little broader and see if I can put together a pull request that adds a few new related method to the There isn't any kind of official test environment, right? I'd need to set something up with my own SharePoint access for myself to write and run tests? |
That would be great! There is a test environment, but it's just my own MS365 account right now. Any business account code is untested. So yeah, you'd have to mock something up on your own, unfortunately. One note: List children is just your regular file listing, which is already implemented as In terms of code style: have a look at the existing code and copy it. In particular, try not to use the Tidyverse unless absolutely necessary. One of my objectives is to avoid bloating the list of dependencies, and pulling in things like dplyr or tidyr can have a big impact. You also mentioned that you're not very familiar with R6. Do you know any of the big languages (Python, Java, C#, C++ etc)? R6 is basically how these other languages do object-oriented programming. |
Yeah, I mainly work in the tidyverse but I've done enough package development that I can handle alternate workflows in base R. I came to programming via urban planning and public health so R is the only language I "know" but I'm decent at adapting code samples and reading documentation even when it isn't something I'm familiar with. I'll try to start with a small PR for a drive item version method to make sure I get the conventions right – should take a week or two at most. This package has been a big help to me since a colleague introduced it to me back in the fall so I'm excited to contribute back. |
ms_drive_item
methods for item version history, analytics, retention labels, etc.
I'd be interested in seeing a feature added that allow the retrieval of the version history for a SharePoint item (especially a Word document) when returning the item metadata. This could also be handled as a separate method if that is more appropriate for the package design.
I know how to access the file version history from within Microsoft Word but I had difficulty finding any documentation on how this information can be handled programmatically. I do see that the .NET library has an option for working with document library versions: https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.tools.word.document.documentlibraryversions?view=vsto-2017#microsoft-office-tools-word-document-documentlibraryversions
I also found a couple of references to API endpoints here: https://community.fabric.microsoft.com/t5/Desktop/Getting-version-history-from-SharePoint-document-library/m-p/776338
And here: https://learn.microsoft.com/en-us/answers/questions/1076146/get-version-history-of-a-word-online-document-thro
This may be out of scope for the Microsoft365R package but, if so, I'd still welcome any tips on how to approach this within R. Thanks for the package!
The text was updated successfully, but these errors were encountered: