问题
I am trying to see what is the result of calling Files Trending around me API (https://graph.microsoft.com/beta/me/trendingAround) but I just get the following:
{{ "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('071578c7-9961-4b43-970b-66fbbb6a938f')/trendingAround", "value": [] }}
If I call Get My Files (https://graph.microsoft.com/v1.0/me/drive/root/children) I get a list of my files, but I am getting anything calling Files trending around me, and I didn't find any documentation about it, just to see what that API includes.
Can anybody tell me what should be the resoult of it?
Thanks!!
回答1:
trendingAround is defined as:
<NavigationProperty Name="trendingAround" Type="Collection(Microsoft.OutlookServices.driveItem)" ContainsTarget="true" />
where driveItem is the OneDrive item type. (There are no new properties defined by Microsoft.OutlookServices.) Thus schema-wise, the response from /me/trendingAround is compatible with the response from /me/drive/root/children.
However, while the 2 responses conform to the same schema, it doesn't mean that they have the same properties populated. The response from trendingAround seems to contain fewer properties. Here is a sample response I get:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('...')/trendingAround",
"value": [
{
"@odata.id": "Drives('...')/items('..')",
"id": "...",
"name": "...",
"DateTimeCreated": "...",
"DateTimeLastModified": "...",
"webUrl": "..."
}
]
}
Keep in mind that /me/trendingAround is not an official API and is subject to change/removal.
来源:https://stackoverflow.com/questions/37051908/office-graph-trendingaround-api-result