使用Exchangelib getuseravailabilitay服务

发布于 2025-02-07 12:39:58 字数 89 浏览 1 评论 0 原文

我有一个用户联系人来交换,我需要查询免费/忙碌的时间信息。我可以通过将它们添加到日历邀请中,然后检查用户的空闲时间来做到这一点。 Exchangelib是否可以吗?

I have a user Contact in Exchange that I need to query the free/busy time info for. I can do that in Outlook by adding them to a calendar invite and then checking the user's free time. Is the same possible with exchangelib?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靑春怀旧 2025-02-14 12:39:58

get_free_busy_info 方法应该做您想要的事情:

import datetime
from exchangelib import Account

a = Account(...)
start = datetime.datetime.now(a.default_timezone)
end = start + datetime.timedelta(hours=6)
accounts = [(a, 'Organizer', False)]
for busy_info in a.protocol.get_free_busy_info(
        accounts=accounts, start=start, end=end
):
    print(busy_info)

请参阅

The get_free_busy_info method should do what you want:

import datetime
from exchangelib import Account

a = Account(...)
start = datetime.datetime.now(a.default_timezone)
end = start + datetime.timedelta(hours=6)
accounts = [(a, 'Organizer', False)]
for busy_info in a.protocol.get_free_busy_info(
        accounts=accounts, start=start, end=end
):
    print(busy_info)

See https://ecederstrand.github.io/exchangelib/#non-account-services

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文