msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

DriveItem class question (subject of change or not ?)

Open a-martynov opened this issue 6 years ago • 5 comments

We extremely use Microsoft.Graph.DriveItem class.

We request files by this code first: IDriveSharedWithMeRequest driveItemsRequest = _graphClient.Client.Me.Drive.SharedWithMe().Request(queryOptions); and by this

IDriveItemChildrenCollectionRequest request = _graphClient.Client.Sites[siteId].Lists[listId].Items[itemId].DriveItem
                    .Children.Request().Expand("listItem($expand = fields)");

then, using this dictionary inside, we parse ListId(2a044c52-6558-43bf-8111-a373e6edbda5) and ItemId (21006)

DriveItem.ListItem.AdditionalData["[email protected]"]= "https://graph.microsoft.com/v1.0/$metadata#sites('7e405b95-e0dd-482d-97f7-b04ea6b57ed0')/lists('2a044c52-6558-43bf-8111-a373e6edbda5')/items('21006')/driveItem/children('01MULKCAVQSFNWRJ6JKJC3EQKBC326BPQ2')/listItem/fields/$entity]}"

we save them in our DB to get this file later by this code:

var listItemsRequest = _graphClient.Client.Sites[siteId]
                                                       .Lists[listId]
                                                       .Items[itemId]
                                                       .Request(new List<QueryOption>()
                                                                    {
                                                                        new QueryOption("expand", "driveItem"),
                                                                    });

Its critical part of our application, so can we expect AdditionalData["[email protected]"] string with ids will be here in future ?

a-martynov avatar Jul 07 '20 11:07 a-martynov

This is a great question to ask on StackOverflow. Please tag your post with [microsoft-graph] and [onedrive]. Share a link to your post in this issue.

MIchaelMainer avatar Jul 09 '20 20:07 MIchaelMainer

asked this question here https://stackoverflow.com/questions/62847387/microsoft-graph-sdk-is-driveitem-class-subject-to-change

a-martynov avatar Jul 11 '20 09:07 a-martynov

Gave an answer on the post. It is unlikely to change. Note, I'm not an expert on that API.

MIchaelMainer avatar Jul 23 '20 01:07 MIchaelMainer

Gave an answer on the post. It is unlikely to change. Note, I'm not an expert on that API. @MIchaelMainer May be you now the place where I can ask authors of these APIs ? And thank you for your research

a-martynov avatar Jul 23 '20 19:07 a-martynov

@a-martynov StackOverflow is the best place to post these type of questions.

MIchaelMainer avatar Jul 23 '20 19:07 MIchaelMainer