mailbox-org-api 0.2__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/PKG-INFO +1 -1
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api/APIClient.py +57 -2
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api.egg-info/PKG-INFO +1 -1
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/pyproject.toml +1 -1
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/setup.py +1 -1
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/LICENSE +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/README.md +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api/__init__.py +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api.egg-info/SOURCES.txt +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api.egg-info/dependency_links.txt +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/mailbox_org_api.egg-info/top_level.txt +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/setup.cfg +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/tests/__init__.py +0 -0
- {mailbox_org_api-0.2 → mailbox_org_api-0.2.1}/tests/tests.py +0 -0
|
@@ -255,13 +255,14 @@ class APIClient:
|
|
|
255
255
|
'inboxsave':inboxsave, 'forwards':forwards, 'memo':memo,
|
|
256
256
|
'language':language, 'uid_extern':uid_extern})
|
|
257
257
|
|
|
258
|
-
def mail_get(self, mail: str):
|
|
258
|
+
def mail_get(self, mail: str, include_quota_usage: bool = False) -> dict:
|
|
259
259
|
"""
|
|
260
260
|
Function to retrieve a mail address
|
|
261
261
|
:param mail: the mail to retrieve
|
|
262
|
+
:param include_quota_usage: True if the quota usage should be included in the request
|
|
262
263
|
:return the response for the request
|
|
263
264
|
"""
|
|
264
|
-
return self.api_request('mail.get', {'mail':mail})
|
|
265
|
+
return self.api_request('mail.get', {'mail':mail, 'include_quota_usage':include_quota_usage})
|
|
265
266
|
|
|
266
267
|
def mail_set(self, mail: str, attributes: dict):
|
|
267
268
|
"""
|
|
@@ -282,6 +283,60 @@ class APIClient:
|
|
|
282
283
|
params.update({attribute: attributes[attribute]})
|
|
283
284
|
return self.api_request('mail.set', params)
|
|
284
285
|
|
|
286
|
+
def mail_set_password(self, mail: str, password: str) -> dict:
|
|
287
|
+
"""
|
|
288
|
+
Function to set a new password for a mail
|
|
289
|
+
:param mail: the mail to set the password for
|
|
290
|
+
:param password: the password to set
|
|
291
|
+
:return: the response for the request
|
|
292
|
+
"""
|
|
293
|
+
return self.api_request('mail.set', {'mail':mail, 'password':password})
|
|
294
|
+
|
|
295
|
+
def mail_set_password_require_reset(self, mail: str, password: str) -> dict:
|
|
296
|
+
"""
|
|
297
|
+
Function to set a new password for a mail and force the user to set a new password on the next login
|
|
298
|
+
:param mail: the mail to set the password for
|
|
299
|
+
:param password: the password to set
|
|
300
|
+
:return: the response for the request
|
|
301
|
+
"""
|
|
302
|
+
return self.api_request('mail.set', {'mail': mail, 'password': password, 'require_reset': True})
|
|
303
|
+
|
|
304
|
+
def mail_set_plan(self, mail: str, plan: str) -> dict:
|
|
305
|
+
"""
|
|
306
|
+
Function to set a new plan for a mail
|
|
307
|
+
:param mail: the mail to set the plan for
|
|
308
|
+
:param plan: the plan to set
|
|
309
|
+
:return: the response for the request
|
|
310
|
+
"""
|
|
311
|
+
return self.api_request('mail.set', {'mail':mail, 'plan':plan})
|
|
312
|
+
|
|
313
|
+
def mail_set_forwards(self, mail: str, forwards: list) -> dict:
|
|
314
|
+
"""
|
|
315
|
+
Function to set mail forwards
|
|
316
|
+
:param mail: the mail to set the forwards for
|
|
317
|
+
:param forwards: a list of addresses to forwards mails to
|
|
318
|
+
:return: the response for the request
|
|
319
|
+
"""
|
|
320
|
+
return self.api_request('mail.set', {'mail':mail, 'forwards':forwards})
|
|
321
|
+
|
|
322
|
+
def mail_set_aliases(self, mail: str, aliases: list) -> dict:
|
|
323
|
+
"""
|
|
324
|
+
Function to set mail aliases
|
|
325
|
+
:param mail: the mail to set the aliases for
|
|
326
|
+
:param aliases: a list of aliases to set
|
|
327
|
+
:return: the response for the request
|
|
328
|
+
"""
|
|
329
|
+
return self.api_request('mail.set', {'mail':mail, 'aliases':aliases})
|
|
330
|
+
|
|
331
|
+
def mail_set_state(self, mail: str, active: bool) -> dict:
|
|
332
|
+
"""
|
|
333
|
+
Function to activate or deactivate a mail
|
|
334
|
+
:param mail: the mail to set the status for
|
|
335
|
+
:param active: True if the mail should be active, False if it shall be deactivated
|
|
336
|
+
:return: the response for the request
|
|
337
|
+
"""
|
|
338
|
+
return self.api_request('mail.set', {'mail':mail, 'active':active})
|
|
339
|
+
|
|
285
340
|
def mail_capabilities_set(self, mail: str, capabilties: dict) -> dict:
|
|
286
341
|
"""
|
|
287
342
|
Function to set a domain capabilities
|
|
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
|
|
|
3
3
|
setup(
|
|
4
4
|
name='mailbox_org_api',
|
|
5
5
|
packages=find_packages(),
|
|
6
|
-
version='0.2',
|
|
6
|
+
version='0.2.1',
|
|
7
7
|
description='A library to access the mailbox.org Business API',
|
|
8
8
|
author='Hendrik Schlange',
|
|
9
9
|
install_requires=['requests'],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|