graph - Microsoft Graph API 在时间间隔内获取日历更改,按 lastModifiedDateTime 过滤
问题描述
我试图在特定日期之后在日历中获取修改或创建的事件。
- 按照文档链接,我可以使用此 url 获取今年的事件。
https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00
- 由于我只想在特定日期之后获取修改或创建的事件,因此我尝试使用过滤器和 lastModifiedDateTime 属性,通过这种方式
https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&$filter=lastModifiedDateTime%20gt%202020-10-01T00:00:00z
试图获取本月修改的事件,我得到一个空的响应,甚至没有错误。
- 我也尝试过使用这种方式文档链接
https://graph.microsoft.com/v1.0/me/calendarView/delta?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&lastModifiedDateTime%20gt%202020-10-01T00:00:00z
但它返回一年中的所有事件,并且不按 lastModifiedDateTime 过滤。
有什么适当的方法可以在特定日期之后获取修改或创建的日历事件?
解决方案
看起来 calendarView 不能与过滤器一起正常工作,一个可行的替代方法是过滤器列表事件,文档链接
工作网址如下所示:https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z"
推荐阅读
- javascript - 如何在本地项目结构中保留 js 脚本并使用它 [Angular]
- c++ - 如何配置 basler 相机以不获取重复图像
- amazon-web-services - Lambda 定价仅限于账户或组织?
- javascript - 如何跨服务器为用户存储数据不和谐
- python - 如何使用 Twython 发送直接消息?
- db2 - 检查 DB2 中值的幂
- c# - Azure 中的多步骤任务
- amazon-cloudfront - 我们如何使用请求和标头信息监控到达云端的请求
- android - 手动创建 api 后错误删除的 Firebase 凭据 API 无法正常工作
- jenkins - 如何在不使用参数的情况下在下游构建中获取上游构建的所有者?