android - 用于获取日历事件的 MSGraph Api
问题描述
我正在尝试使用 Microsoft graph api 获取日历事件。(GET /me/calendar/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime})我正在获取下一组事件的响应 JSON(其中包含前 10 个事件)url . 我使用改造来获得这些事件。
第一个请求的 URL
现在的问题是如何按顺序调用改造 api,每个响应 json 都有下一个请求 url。我必须使用它并发送新的改造请求。
解决方案
您可以简单地使用以下 HTTP 调用根据开始日期时间顺序获取事件。
https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2020-01-01T19:00:00-08:00&endDateTime=2020-12-12T19:00:00-08:00&$select=id, subject, start, end&$top=100&$orderby=start/dateTime
这里 $top 可以改变每页的记录数,它的值范围是 1 到 999,如果你的记录超过 999,你需要使用 nextLink 来获取下一组记录,这将是有序的。
我使用 $orderBy 根据开始日期时间顺序获取记录。
推荐阅读
- python - 如何在一组过滤行上使用 apply 和 lambda 函数
- python - 使用 Python 跟踪特定时间的 GPS 数据
- python - 是否可以在字典中列出一系列数字?
- highcharts - 如何添加下拉列表以更改显示 HTML 表中日期的图表中的 endRow 值
- python - 如何获得复杂形状多边形的中心线
- javascript - React Native 防止上下文依赖重新渲染所有组件
- drop-down-menu - Gravity Forms - 使用用户输入的信息动态填充下拉列表
- python - 需要在同一密集层中的权重之间进行数学运算
- javascript - 我不明白: for (var node = list; node; node = node.rest)
- javascript - PDF 下载显示为从 Chrome 中的服务器返回的字节码