Office Graph TrendingAround API result?

时光毁灭记忆、已成空白 提交于 2019-12-12 05:14:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!