From e8a811d433c207a5147acf74900524cc0d60c637 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 29 Jul 2024 14:13:16 +0200 Subject: [PATCH] docs: Fix example code for shared folder access. Fixes #1325 --- docs/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 415670ee..38777ff8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -199,18 +199,21 @@ johns_account = Account( ``` If you want to impersonate an account and access a shared folder that this -account has access to, you need to specify the email adress of the shared +account has access to, you need to specify the email address of the shared folder to access the folder: ```python -from exchangelib.folders import Calendar, SingleFolderQuerySet +from exchangelib.folders import Calendar, Folder, SingleFolderQuerySet from exchangelib.properties import DistinguishedFolderId, Mailbox shared_calendar = SingleFolderQuerySet( account=johns_account, - folder=DistinguishedFolderId( - id=Calendar.DISTINGUISHED_FOLDER_ID, - mailbox=Mailbox(email_address="mary@example.com"), + folder=Folder( + root=johns_account.root, + _distinguished_id=DistinguishedFolderId( + id=Calendar.DISTINGUISHED_FOLDER_ID, + mailbox=Mailbox(email_address="mary@example.com"), + ), ), ).resolve() ```