From 5fa602e49c01a1953942c6228d75f45ffc3020f6 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 10 Jun 2024 09:27:03 +0200 Subject: [PATCH] docs: Update docs --- docs/exchangelib/autodiscover/cache.html | 10 +- docs/exchangelib/autodiscover/index.html | 27 +-- docs/exchangelib/autodiscover/protocol.html | 33 +-- docs/exchangelib/credentials.html | 38 ++-- docs/exchangelib/fields.html | 12 +- docs/exchangelib/folders/base.html | 12 +- docs/exchangelib/folders/collections.html | 14 +- docs/exchangelib/folders/index.html | 213 +++++++++++++++--- docs/exchangelib/folders/known_folders.html | 195 ++++++++++++++-- docs/exchangelib/folders/roots.html | 26 +++ docs/exchangelib/index.html | 12 +- docs/exchangelib/properties.html | 46 ++-- docs/exchangelib/services/common.html | 54 ++--- docs/exchangelib/services/get_attachment.html | 51 ++--- .../services/get_streaming_events.html | 25 +- .../services/get_user_settings.html | 12 - docs/exchangelib/services/index.html | 76 +++---- docs/exchangelib/services/subscribe.html | 4 - docs/exchangelib/util.html | 73 +++--- docs/exchangelib/winzone.html | 10 +- 20 files changed, 604 insertions(+), 339 deletions(-) diff --git a/docs/exchangelib/autodiscover/cache.html b/docs/exchangelib/autodiscover/cache.html index 907e0b57..bce9493c 100644 --- a/docs/exchangelib/autodiscover/cache.html +++ b/docs/exchangelib/autodiscover/cache.html @@ -144,9 +144,8 @@

Module exchangelib.autodiscover.cache

# Empty both local and persistent cache. Don't fail on non-existing entries because we could end here # multiple times due to race conditions. domain = key[0] - with shelve_open_with_failover(self._storage_file) as db: - with suppress(KeyError): - del db[str(domain)] + with shelve_open_with_failover(self._storage_file) as db, suppress(KeyError): + del db[str(domain)] with suppress(KeyError): del self._protocols[key] @@ -328,9 +327,8 @@

Classes

# Empty both local and persistent cache. Don't fail on non-existing entries because we could end here # multiple times due to race conditions. domain = key[0] - with shelve_open_with_failover(self._storage_file) as db: - with suppress(KeyError): - del db[str(domain)] + with shelve_open_with_failover(self._storage_file) as db, suppress(KeyError): + del db[str(domain)] with suppress(KeyError): del self._protocols[key] diff --git a/docs/exchangelib/autodiscover/index.html b/docs/exchangelib/autodiscover/index.html index 03e865b6..4f60b5f9 100644 --- a/docs/exchangelib/autodiscover/index.html +++ b/docs/exchangelib/autodiscover/index.html @@ -208,9 +208,8 @@

Classes

# Empty both local and persistent cache. Don't fail on non-existing entries because we could end here # multiple times due to race conditions. domain = key[0] - with shelve_open_with_failover(self._storage_file) as db: - with suppress(KeyError): - del db[str(domain)] + with shelve_open_with_failover(self._storage_file) as db, suppress(KeyError): + del db[str(domain)] with suppress(KeyError): del self._protocols[key] @@ -319,15 +318,8 @@

Methods

return get_autodiscover_authtype(protocol=self) def get_user_settings(self, user, settings=None): - if not settings: - settings = [ - "user_dn", - "mailbox_dn", - "user_display_name", - "auto_discover_smtp_address", - "external_ews_url", - "ews_supported_schemas", - ] + if settings is None: + settings = sorted(UserResponse.SETTINGS_MAP.keys()) for setting in settings: if setting not in UserResponse.SETTINGS_MAP: raise ValueError( @@ -420,15 +412,8 @@

Methods

Expand source code
def get_user_settings(self, user, settings=None):
-    if not settings:
-        settings = [
-            "user_dn",
-            "mailbox_dn",
-            "user_display_name",
-            "auto_discover_smtp_address",
-            "external_ews_url",
-            "ews_supported_schemas",
-        ]
+    if settings is None:
+        settings = sorted(UserResponse.SETTINGS_MAP.keys())
     for setting in settings:
         if setting not in UserResponse.SETTINGS_MAP:
             raise ValueError(
diff --git a/docs/exchangelib/autodiscover/protocol.html b/docs/exchangelib/autodiscover/protocol.html
index 99875ef1..93dfd587 100644
--- a/docs/exchangelib/autodiscover/protocol.html
+++ b/docs/exchangelib/autodiscover/protocol.html
@@ -65,15 +65,8 @@ 

Module exchangelib.autodiscover.protocol

return get_autodiscover_authtype(protocol=self) def get_user_settings(self, user, settings=None): - if not settings: - settings = [ - "user_dn", - "mailbox_dn", - "user_display_name", - "auto_discover_smtp_address", - "external_ews_url", - "ews_supported_schemas", - ] + if settings is None: + settings = sorted(UserResponse.SETTINGS_MAP.keys()) for setting in settings: if setting not in UserResponse.SETTINGS_MAP: raise ValueError( @@ -144,15 +137,8 @@

Classes

return get_autodiscover_authtype(protocol=self) def get_user_settings(self, user, settings=None): - if not settings: - settings = [ - "user_dn", - "mailbox_dn", - "user_display_name", - "auto_discover_smtp_address", - "external_ews_url", - "ews_supported_schemas", - ] + if settings is None: + settings = sorted(UserResponse.SETTINGS_MAP.keys()) for setting in settings: if setting not in UserResponse.SETTINGS_MAP: raise ValueError( @@ -245,15 +231,8 @@

Methods

Expand source code
def get_user_settings(self, user, settings=None):
-    if not settings:
-        settings = [
-            "user_dn",
-            "mailbox_dn",
-            "user_display_name",
-            "auto_discover_smtp_address",
-            "external_ews_url",
-            "ews_supported_schemas",
-        ]
+    if settings is None:
+        settings = sorted(UserResponse.SETTINGS_MAP.keys())
     for setting in settings:
         if setting not in UserResponse.SETTINGS_MAP:
             raise ValueError(
diff --git a/docs/exchangelib/credentials.html b/docs/exchangelib/credentials.html
index a6df53cb..ed5d708b 100644
--- a/docs/exchangelib/credentials.html
+++ b/docs/exchangelib/credentials.html
@@ -199,7 +199,8 @@ 

Module exchangelib.credentials

) return res - def token_params(self): + @staticmethod + def token_params(): """Extra parameters when requesting the token""" return {"include_client_id": True} @@ -506,7 +507,8 @@

Subclasses

) return res - def token_params(self): + @staticmethod + def token_params(): """Extra parameters when requesting the token""" return {"include_client_id": True} @@ -549,6 +551,24 @@

Subclasses

  • OAuth2AuthorizationCodeCredentials
  • OAuth2Credentials
  • +

    Static methods

    +
    +
    +def token_params() +
    +
    +

    Extra parameters when requesting the token

    +
    + +Expand source code + +
    @staticmethod
    +def token_params():
    +    """Extra parameters when requesting the token"""
    +    return {"include_client_id": True}
    +
    +
    +

    Instance variables

    var access_token
    @@ -733,20 +753,6 @@

    Methods

    return hash(tuple(res))
    -
    -def token_params(self) -
    -
    -

    Extra parameters when requesting the token

    -
    - -Expand source code - -
    def token_params(self):
    -    """Extra parameters when requesting the token"""
    -    return {"include_client_id": True}
    -
    -
    diff --git a/docs/exchangelib/fields.html b/docs/exchangelib/fields.html index 0ef39cd5..ac6784f7 100644 --- a/docs/exchangelib/fields.html +++ b/docs/exchangelib/fields.html @@ -321,7 +321,6 @@

    Module exchangelib.fields

    is_searchable=True, is_attribute=False, default=None, - *args, **kwargs, ): self.name = name # Usually set by the EWSMeta metaclass @@ -338,7 +337,7 @@

    Module exchangelib.fields

    self.is_searchable = is_searchable # When true, this field is treated as an XML attribute instead of an element self.is_attribute = is_attribute - super().__init__(*args, **kwargs) + super().__init__(**kwargs) def clean(self, value, version=None): if version and not self.supports_version(version): @@ -3696,7 +3695,7 @@

    Inherited members

    class EmailSubField -(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, *args, **kwargs) +(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, **kwargs)

    A field to hold the value on an SingleFieldIndexedElement.

    @@ -4126,7 +4125,7 @@

    Inherited members

    class Field -(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, *args, **kwargs) +(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, **kwargs)

    Holds information related to an item field.

    @@ -4157,7 +4156,6 @@

    Inherited members

    is_searchable=True, is_attribute=False, default=None, - *args, **kwargs, ): self.name = name # Usually set by the EWSMeta metaclass @@ -4174,7 +4172,7 @@

    Inherited members

    self.is_searchable = is_searchable # When true, this field is treated as an XML attribute instead of an element self.is_attribute = is_attribute - super().__init__(*args, **kwargs) + super().__init__(**kwargs) def clean(self, value, version=None): if version and not self.supports_version(version): @@ -6562,7 +6560,7 @@

    Inherited members

    class SubField -(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, *args, **kwargs) +(name=None, is_required=False, is_required_after_save=False, is_read_only=False, is_read_only_after_send=False, is_searchable=True, is_attribute=False, default=None, **kwargs)

    A field to hold the value on an IndexedElement.

    diff --git a/docs/exchangelib/folders/base.html b/docs/exchangelib/folders/base.html index 32a5ba63..6b8dc2b3 100644 --- a/docs/exchangelib/folders/base.html +++ b/docs/exchangelib/folders/base.html @@ -275,7 +275,7 @@

    Module exchangelib.folders.base

    from .known_folders import ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, @@ -298,7 +298,7 @@

    Module exchangelib.folders.base

    for folder_cls in ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, @@ -1190,7 +1190,7 @@

    Classes

    from .known_folders import ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, @@ -1213,7 +1213,7 @@

    Classes

    for folder_cls in ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, @@ -1872,7 +1872,7 @@

    Static methods

    from .known_folders import ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, @@ -1895,7 +1895,7 @@

    Static methods

    for folder_cls in ( ApplicationData, Calendar, - Companies, + CompanyContacts, Contacts, ConversationSettings, CrawlerData, diff --git a/docs/exchangelib/folders/collections.html b/docs/exchangelib/folders/collections.html index f6b93b79..f1c1b9bd 100644 --- a/docs/exchangelib/folders/collections.html +++ b/docs/exchangelib/folders/collections.html @@ -119,7 +119,7 @@

    Module exchangelib.folders.collections

    def people(self): return QuerySet(self).people() - def view(self, start, end, max_items=None, *args, **kwargs): + def view(self, start, end, max_items=None): """Implement the CalendarView option to FindItem. The difference between 'filter' and 'view' is that 'filter' only returns the master CalendarItem for recurring items, while 'view' unfolds recurring items and returns all CalendarItem occurrences as one would normally expect when presenting a calendar. @@ -137,7 +137,7 @@

    Module exchangelib.folders.collections

    :param max_items: (Default value = None) :return: """ - qs = QuerySet(self).filter(*args, **kwargs) + qs = QuerySet(self) qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items) return qs @@ -726,7 +726,7 @@

    Subclasses

    def people(self): return QuerySet(self).people() - def view(self, start, end, max_items=None, *args, **kwargs): + def view(self, start, end, max_items=None): """Implement the CalendarView option to FindItem. The difference between 'filter' and 'view' is that 'filter' only returns the master CalendarItem for recurring items, while 'view' unfolds recurring items and returns all CalendarItem occurrences as one would normally expect when presenting a calendar. @@ -744,7 +744,7 @@

    Subclasses

    :param max_items: (Default value = None) :return: """ - qs = QuerySet(self).filter(*args, **kwargs) + qs = QuerySet(self) qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items) return qs @@ -1831,7 +1831,7 @@

    Examples

    -def view(self, start, end, max_items=None, *args, **kwargs) +def view(self, start, end, max_items=None)

    Implement the CalendarView option to FindItem. The difference between 'filter' and 'view' is that 'filter' @@ -1851,7 +1851,7 @@

    Examples

    Expand source code -
    def view(self, start, end, max_items=None, *args, **kwargs):
    +
    def view(self, start, end, max_items=None):
         """Implement the CalendarView option to FindItem. The difference between 'filter' and 'view' is that 'filter'
         only returns the master CalendarItem for recurring items, while 'view' unfolds recurring items and returns all
         CalendarItem occurrences as one would normally expect when presenting a calendar.
    @@ -1869,7 +1869,7 @@ 

    Examples

    :param max_items: (Default value = None) :return: """ - qs = QuerySet(self).filter(*args, **kwargs) + qs = QuerySet(self) qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items) return qs
    diff --git a/docs/exchangelib/folders/index.html b/docs/exchangelib/folders/index.html index 982b1759..df85f225 100644 --- a/docs/exchangelib/folders/index.html +++ b/docs/exchangelib/folders/index.html @@ -51,7 +51,7 @@

    Module exchangelib.folders

    CalendarLogging, CalendarSearchCache, CommonViews, - Companies, + CompanyContacts, Conflicts, Contacts, ConversationHistory, @@ -119,6 +119,7 @@

    Module exchangelib.folders

    SearchFolders, SentItems, ServerFailures, + ShadowItems, SharePointNotifications, Sharing, Shortcuts, @@ -166,7 +167,7 @@

    Module exchangelib.folders

    "CalendarLogging", "CalendarSearchCache", "CommonViews", - "Companies", + "CompanyContacts", "Conflicts", "Contacts", "ConversationHistory", @@ -247,6 +248,7 @@

    Module exchangelib.folders

    "SearchFolders", "SentItems", "ServerFailures", + "ShadowItems", "SharePointNotifications", "Sharing", "ShortNotes", @@ -473,7 +475,8 @@

    Inherited members

    class AllContacts(WellknownFolder):
         DISTINGUISHED_FOLDER_ID = "allcontacts"
    -    CONTAINER_CLASS = "IPF.Note"
    + CONTAINER_CLASS = "IPF.Note" + supported_from = EXCHANGE_O365

    Ancestors

      @@ -496,6 +499,10 @@

      Class variables

      +
      var supported_from
      +
      +
      +

      Inherited members

        @@ -547,7 +554,8 @@

        Inherited members

        class AllItems(WellknownFolder):
             DISTINGUISHED_FOLDER_ID = "allitems"
        -    CONTAINER_CLASS = "IPF"
        + CONTAINER_CLASS = "IPF" + supported_from = EXCHANGE_O365

    Ancestors