【问题标题】:Office Graph TrendingAround API result?Office Graph TrendingAround API 结果?
【发布时间】:2016-05-05 13:27:56
【问题描述】:

我正在尝试查看调用 Files Trending around me API (https://graph.microsoft.com/beta/me/trendingAround) 的结果,但我只得到以下信息:

{{ "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('071578c7-9961-4b43-970b-66fbbb6a938f')/trendingAround", “价值”: [] }}

如果我调用 Get My Files (https://graph.microsoft.com/v1.0/me/drive/root/children),我会得到一个文件列表,但我会得到任何调用 Files 的东西在我周围流行,我没有找到任何关于它的文档,只是想看看那个 API包括。

谁能告诉我它的结果应该是什么?

谢谢!!

【问题讨论】:

    标签: office365 microsoft-graph-api


    【解决方案1】:

    trendingAround 定义为:

    <NavigationProperty Name="trendingAround" Type="Collection(Microsoft.OutlookServices.driveItem)" ContainsTarget="true" />
    

    其中driveItem 是 OneDrive 项目类型。 (Microsoft.OutlookServices 没有定义新的属性。)因此,从架构上看,来自/me/trendingAround 的响应与来自/me/drive/root/children 的响应兼容。

    但是,虽然 2 个响应符合相同的架构,但这并不意味着它们填充了相同的属性。 trendingAround 的响应似乎包含较少的属性。这是我得到的一个示例响应:

    {
      "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('...')/trendingAround",
      "value": [
        {
          "@odata.id": "Drives('...')/items('..')",
          "id": "...",
          "name": "...",
          "DateTimeCreated": "...",
          "DateTimeLastModified": "...",
          "webUrl": "..."
        }
     ]
    }
    

    请记住,/me/trendingAround 不是官方 API,可能会更改/删除。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多