我使用以下代码来检索日历条目:
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代码库上找到答案,但他们似乎没有深入了解库中存在哪些函数以及各自的参数是什么。他们只是列举了一些例子。
发布于 2020-05-27 03:12:25
根据这里的文档: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)
希望这对你有帮助。
https://stackoverflow.com/questions/62031977
复制相似问题