我使用以下代码检索日历项:
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存储库上找到答案,但是它们似乎并未进一步详细说明库中存在哪些函数以及各个参数是什么。他们只是列出示例。
您可以使用limit参数将其增加为999。类似于get_events(limit = 500,*,query = None,order_by = None,batch = None,download_attachments = False)
希望这对您有所帮助。