File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1926,8 +1926,21 @@ for change_type, item in a.inbox.sync_items():
19261926# a.inbox.item_sync_state.
19271927```
19281928
1929+ EWS allows subscribing to changes in a mailbox. There are three types of subscriptions; pull,
1930+ push and streaming. For each type, you can subscribe to all folders at once, to a single
1931+ folder, or to a collection of folders (see description of ` FolderCollection ` above). In the
1932+ following, we show only examples for subscriptions on ` Account.inbox ` , but the others are
1933+ also possible.
1934+
19291935Here's how to create a pull subscription that can be used to pull events from the server:
19301936``` python
1937+ # Subscribe to all folders
1938+ subscription_id, watermark = a.subscribe_to_pull()
1939+
1940+ # Subscribe to a collection of folders
1941+ subscription_id, watermark = a.inbox.glob(" foo*" ).subscribe_to_pull()
1942+
1943+ # Subscribe to one folder
19311944subscription_id, watermark = a.inbox.subscribe_to_pull()
19321945```
19331946
You can’t perform that action at this time.
0 commit comments