Skip to content

Commit

Permalink
docs: Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Cederstrand committed Jun 10, 2024
1 parent e86f915 commit 5fa602e
Show file tree
Hide file tree
Showing 20 changed files with 604 additions and 339 deletions.
10 changes: 4 additions & 6 deletions docs/exchangelib/autodiscover/cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ <h1 class="title">Module <code>exchangelib.autodiscover.cache</code></h1>
# Empty both local and persistent cache. Don&#39;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]

Expand Down Expand Up @@ -328,9 +327,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
# Empty both local and persistent cache. Don&#39;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]

Expand Down
27 changes: 6 additions & 21 deletions docs/exchangelib/autodiscover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
# Empty both local and persistent cache. Don&#39;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]

Expand Down Expand Up @@ -319,15 +318,8 @@ <h3>Methods</h3>
return get_autodiscover_authtype(protocol=self)

def get_user_settings(self, user, settings=None):
if not settings:
settings = [
&#34;user_dn&#34;,
&#34;mailbox_dn&#34;,
&#34;user_display_name&#34;,
&#34;auto_discover_smtp_address&#34;,
&#34;external_ews_url&#34;,
&#34;ews_supported_schemas&#34;,
]
if settings is None:
settings = sorted(UserResponse.SETTINGS_MAP.keys())
for setting in settings:
if setting not in UserResponse.SETTINGS_MAP:
raise ValueError(
Expand Down Expand Up @@ -420,15 +412,8 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_user_settings(self, user, settings=None):
if not settings:
settings = [
&#34;user_dn&#34;,
&#34;mailbox_dn&#34;,
&#34;user_display_name&#34;,
&#34;auto_discover_smtp_address&#34;,
&#34;external_ews_url&#34;,
&#34;ews_supported_schemas&#34;,
]
if settings is None:
settings = sorted(UserResponse.SETTINGS_MAP.keys())
for setting in settings:
if setting not in UserResponse.SETTINGS_MAP:
raise ValueError(
Expand Down
33 changes: 6 additions & 27 deletions docs/exchangelib/autodiscover/protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,8 @@ <h1 class="title">Module <code>exchangelib.autodiscover.protocol</code></h1>
return get_autodiscover_authtype(protocol=self)

def get_user_settings(self, user, settings=None):
if not settings:
settings = [
&#34;user_dn&#34;,
&#34;mailbox_dn&#34;,
&#34;user_display_name&#34;,
&#34;auto_discover_smtp_address&#34;,
&#34;external_ews_url&#34;,
&#34;ews_supported_schemas&#34;,
]
if settings is None:
settings = sorted(UserResponse.SETTINGS_MAP.keys())
for setting in settings:
if setting not in UserResponse.SETTINGS_MAP:
raise ValueError(
Expand Down Expand Up @@ -144,15 +137,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
return get_autodiscover_authtype(protocol=self)

def get_user_settings(self, user, settings=None):
if not settings:
settings = [
&#34;user_dn&#34;,
&#34;mailbox_dn&#34;,
&#34;user_display_name&#34;,
&#34;auto_discover_smtp_address&#34;,
&#34;external_ews_url&#34;,
&#34;ews_supported_schemas&#34;,
]
if settings is None:
settings = sorted(UserResponse.SETTINGS_MAP.keys())
for setting in settings:
if setting not in UserResponse.SETTINGS_MAP:
raise ValueError(
Expand Down Expand Up @@ -245,15 +231,8 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_user_settings(self, user, settings=None):
if not settings:
settings = [
&#34;user_dn&#34;,
&#34;mailbox_dn&#34;,
&#34;user_display_name&#34;,
&#34;auto_discover_smtp_address&#34;,
&#34;external_ews_url&#34;,
&#34;ews_supported_schemas&#34;,
]
if settings is None:
settings = sorted(UserResponse.SETTINGS_MAP.keys())
for setting in settings:
if setting not in UserResponse.SETTINGS_MAP:
raise ValueError(
Expand Down
38 changes: 22 additions & 16 deletions docs/exchangelib/credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ <h1 class="title">Module <code>exchangelib.credentials</code></h1>
)
return res

def token_params(self):
@staticmethod
def token_params():
&#34;&#34;&#34;Extra parameters when requesting the token&#34;&#34;&#34;
return {&#34;include_client_id&#34;: True}

Expand Down Expand Up @@ -506,7 +507,8 @@ <h3>Subclasses</h3>
)
return res

def token_params(self):
@staticmethod
def token_params():
&#34;&#34;&#34;Extra parameters when requesting the token&#34;&#34;&#34;
return {&#34;include_client_id&#34;: True}

Expand Down Expand Up @@ -549,6 +551,24 @@ <h3>Subclasses</h3>
<li><a title="exchangelib.credentials.OAuth2AuthorizationCodeCredentials" href="#exchangelib.credentials.OAuth2AuthorizationCodeCredentials">OAuth2AuthorizationCodeCredentials</a></li>
<li><a title="exchangelib.credentials.OAuth2Credentials" href="#exchangelib.credentials.OAuth2Credentials">OAuth2Credentials</a></li>
</ul>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.credentials.BaseOAuth2Credentials.token_params"><code class="name flex">
<span>def <span class="ident">token_params</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"><p>Extra parameters when requesting the token</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@staticmethod
def token_params():
&#34;&#34;&#34;Extra parameters when requesting the token&#34;&#34;&#34;
return {&#34;include_client_id&#34;: True}</code></pre>
</details>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="exchangelib.credentials.BaseOAuth2Credentials.access_token"><code class="name">var <span class="ident">access_token</span></code></dt>
Expand Down Expand Up @@ -733,20 +753,6 @@ <h3>Methods</h3>
return hash(tuple(res))</code></pre>
</details>
</dd>
<dt id="exchangelib.credentials.BaseOAuth2Credentials.token_params"><code class="name flex">
<span>def <span class="ident">token_params</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Extra parameters when requesting the token</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def token_params(self):
&#34;&#34;&#34;Extra parameters when requesting the token&#34;&#34;&#34;
return {&#34;include_client_id&#34;: True}</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="exchangelib.credentials.Credentials"><code class="flex name class">
Expand Down
12 changes: 5 additions & 7 deletions docs/exchangelib/fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ <h1 class="title">Module <code>exchangelib.fields</code></h1>
is_searchable=True,
is_attribute=False,
default=None,
*args,
**kwargs,
):
self.name = name # Usually set by the EWSMeta metaclass
Expand All @@ -338,7 +337,7 @@ <h1 class="title">Module <code>exchangelib.fields</code></h1>
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):
Expand Down Expand Up @@ -3696,7 +3695,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="exchangelib.fields.EmailSubField"><code class="flex name class">
<span>class <span class="ident">EmailSubField</span></span>
<span>(</span><span>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)</span>
<span>(</span><span>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)</span>
</code></dt>
<dd>
<div class="desc"><p>A field to hold the value on an SingleFieldIndexedElement.</p></div>
Expand Down Expand Up @@ -4126,7 +4125,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="exchangelib.fields.Field"><code class="flex name class">
<span>class <span class="ident">Field</span></span>
<span>(</span><span>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)</span>
<span>(</span><span>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)</span>
</code></dt>
<dd>
<div class="desc"><p>Holds information related to an item field.</p></div>
Expand Down Expand Up @@ -4157,7 +4156,6 @@ <h3>Inherited members</h3>
is_searchable=True,
is_attribute=False,
default=None,
*args,
**kwargs,
):
self.name = name # Usually set by the EWSMeta metaclass
Expand All @@ -4174,7 +4172,7 @@ <h3>Inherited members</h3>
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):
Expand Down Expand Up @@ -6562,7 +6560,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="exchangelib.fields.SubField"><code class="flex name class">
<span>class <span class="ident">SubField</span></span>
<span>(</span><span>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)</span>
<span>(</span><span>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)</span>
</code></dt>
<dd>
<div class="desc"><p>A field to hold the value on an IndexedElement.</p></div>
Expand Down
12 changes: 6 additions & 6 deletions docs/exchangelib/folders/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h1 class="title">Module <code>exchangelib.folders.base</code></h1>
from .known_folders import (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand All @@ -298,7 +298,7 @@ <h1 class="title">Module <code>exchangelib.folders.base</code></h1>
for folder_cls in (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand Down Expand Up @@ -1190,7 +1190,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
from .known_folders import (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand All @@ -1213,7 +1213,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
for folder_cls in (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand Down Expand Up @@ -1872,7 +1872,7 @@ <h3>Static methods</h3>
from .known_folders import (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand All @@ -1895,7 +1895,7 @@ <h3>Static methods</h3>
for folder_cls in (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand Down
14 changes: 7 additions & 7 deletions docs/exchangelib/folders/collections.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h1 class="title">Module <code>exchangelib.folders.collections</code></h1>
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):
&#34;&#34;&#34;Implement the CalendarView option to FindItem. The difference between &#39;filter&#39; and &#39;view&#39; is that &#39;filter&#39;
only returns the master CalendarItem for recurring items, while &#39;view&#39; unfolds recurring items and returns all
CalendarItem occurrences as one would normally expect when presenting a calendar.
Expand All @@ -137,7 +137,7 @@ <h1 class="title">Module <code>exchangelib.folders.collections</code></h1>
:param max_items: (Default value = None)
:return:
&#34;&#34;&#34;
qs = QuerySet(self).filter(*args, **kwargs)
qs = QuerySet(self)
qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items)
return qs

Expand Down Expand Up @@ -726,7 +726,7 @@ <h3>Subclasses</h3>
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):
&#34;&#34;&#34;Implement the CalendarView option to FindItem. The difference between &#39;filter&#39; and &#39;view&#39; is that &#39;filter&#39;
only returns the master CalendarItem for recurring items, while &#39;view&#39; unfolds recurring items and returns all
CalendarItem occurrences as one would normally expect when presenting a calendar.
Expand All @@ -744,7 +744,7 @@ <h3>Subclasses</h3>
:param max_items: (Default value = None)
:return:
&#34;&#34;&#34;
qs = QuerySet(self).filter(*args, **kwargs)
qs = QuerySet(self)
qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items)
return qs

Expand Down Expand Up @@ -1831,7 +1831,7 @@ <h2 id="examples">Examples</h2>
</details>
</dd>
<dt id="exchangelib.folders.collections.FolderCollection.view"><code class="name flex">
<span>def <span class="ident">view</span></span>(<span>self, start, end, max_items=None, *args, **kwargs)</span>
<span>def <span class="ident">view</span></span>(<span>self, start, end, max_items=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Implement the CalendarView option to FindItem. The difference between 'filter' and 'view' is that 'filter'
Expand All @@ -1851,7 +1851,7 @@ <h2 id="examples">Examples</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def view(self, start, end, max_items=None, *args, **kwargs):
<pre><code class="python">def view(self, start, end, max_items=None):
&#34;&#34;&#34;Implement the CalendarView option to FindItem. The difference between &#39;filter&#39; and &#39;view&#39; is that &#39;filter&#39;
only returns the master CalendarItem for recurring items, while &#39;view&#39; unfolds recurring items and returns all
CalendarItem occurrences as one would normally expect when presenting a calendar.
Expand All @@ -1869,7 +1869,7 @@ <h2 id="examples">Examples</h2>
:param max_items: (Default value = None)
:return:
&#34;&#34;&#34;
qs = QuerySet(self).filter(*args, **kwargs)
qs = QuerySet(self)
qs.calendar_view = CalendarView(start=start, end=end, max_items=max_items)
return qs</code></pre>
</details>
Expand Down
Loading

0 comments on commit 5fa602e

Please sign in to comment.