使用python O365:如何在获取日历事件时检索25个以上的条目?

问题描述 投票:0回答:1

我使用以下代码检索日历项:

from O365 import Account    
# get account element for calendars
schedule = account.schedule()
# get the main calendar
calendar = schedule.get_default_calendar()
# make a query that gets all events between a certain start and end date
begin = datetime.date.today()
end = begin + datetime.timedelta(days = 14)
query = calendar.new_query("start").greater_equal(begin)
query.chain('and').on_attribute('end').less_equal(end) 
# add all events to a variable
myEvents = calendar.get_events(query=query, include_recurring=True)

问题是,我从“ get_events”中最多获得25个条目。

我通常如何处理此类问题?我试图在O365的github存储库上找到答案,但是它们似乎并未进一步详细说明库中存在哪些函数以及各个参数是什么。他们只是列出示例。

python azure calendar azure-ad-graph-api outlook-restapi
1个回答
0
投票
根据此处的文档:https://o365.github.io/python-o365/latest/html/api/calendar.html#O365.calendar.Calendar.get_events

您可以使用limit参数将其增加为999。类似于get_events(limit = 500,*,query = None,order_by = None,batch = None,download_attachments = False)

希望这对您有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.