问题
I know that the query: https://graph.microsoft.com/v1.0/me/messages Corresponds to: GraphClient.Me.Messages.Request().GetAsync()
I am trying to replicate the following requests in Microsoft Graph Client SDK :
Get All Categories https://graph.microsoft.com/beta/me/outlook/masterCategories Corresponding Graph client query: ??
Get All messages that contain certain words in their subject The link will be similar to this https://graph.microsoft.com/v1.0/me/messages?$search="hello world" Corresponding Graph Client : ??
Update each of these messages with a category ?
The documentation only gives 2 examples, where could i find a list of examples/reading material on this?
回答1:
The SDK is generated for the production endpoint (v1.0), so you will have to make a custom request for beta APIs
List<QueryOption> options = new List<QueryOption> { new QueryOption("$search", "hello world") }; var filteredMessages = await graphClient.Me.Messages.Request(options).GetAsync();
This also requires using custom requests since this is beta functionality.
We appreciate your feedback about our docs and how to use the SDK. We have some additional reference in the repo and are continuing to examine options for improving our SDK docs.
回答2:
Since I don't have enough reputation points, I had to post an answer instead of a comment. Thanks user8608110 for your help. Unfortunately, I can't use graph explorer because I'm not an admin. I think I have my patch request setup correctly, but I keep getting an "Empty Payload" error.
I thought stackoverflow was for us to help each other not delete the post of people trying to get help.
来源:https://stackoverflow.com/questions/49072912/microsoft-graph-client-sdk-vs-requesting-jsons