diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index aa7f418..fbcc6ae 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -20,8 +20,8 @@ jobs: python -m pip install -r tests/requirements.txt - name: Test with pytest env: - appSid: ${{secrets.appSid}} - appKey: ${{secrets.appKey}} + clientId: ${{secrets.appSid}} + clientSecret: ${{secrets.appKey}} apiBaseUrl: "https://api-qa.aspose.cloud" run: | python -m pytest --verbose --color=yes -m pipeline tests diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 20943e2..62f4cc3 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -21,8 +21,8 @@ jobs: pip install -r tests/requirements.txt - name : Run Tests env: - appSid: ${{secrets.appSidProd}} - appKey: ${{secrets.appKeyProd}} + clientId: ${{secrets.appSidProd}} + clientSecret: ${{secrets.appKeyProd}} apiBaseUrl: "https://api.aspose.cloud" run: | python -m pytest -m pipeline tests diff --git a/.gitignore b/.gitignore index d87a49c..aa9f37d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,4 +69,5 @@ target/ .idea/ .vscode/ .pytest_cache/ -.venv/ \ No newline at end of file +.venv/ +.run/ \ No newline at end of file diff --git a/README.md b/README.md index 4216ca3..277735d 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,15 @@ Aspose.Email Cloud is a REST API for creating email applications that work with - Email configuration discovery. - Disposable email address detection. -## New features in version 20.10 +## What's new in version 20.12 -Aspose.Email Cloud 20.10.0 comes with SDK improvements: +Aspose.Email Cloud 20.12.0 comes with SDK breaking changes: +- AppKey renamed to ClientSecret. +- AppSID renamed to ClientId. -- Typescript, PHP, Java SDKs now have model builders to simplify their initialization. -- All SDK methods now have code examples with parameters initialization. -- Some models now have initialization examples for all SDKs. -- SDK reference documentation with examples now available at url [docs.aspose.cloud/email/reference-api](https://docs.aspose.cloud/email/reference-api/) +Some [SDK reference documentation](https://docs.aspose.cloud/email/reference-api/) improvements were made. -See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-10-release-notes/). +See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-12-release-notes/). ## How to use the SDK? The complete source code is available in the [GIT repository](https://github.com/aspose-email-cloud/aspose-email-cloud-python/tree/master/sdk/AsposeEmailCloudSdk). @@ -40,7 +39,7 @@ Use [SDK tutorials](https://docs.aspose.cloud/email/sdk-tutorials/) and [SDK ref ### Prerequisites -To use this SDK, you need an App SID and an App Key; they can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/apps) (it requires free registration in Aspose Cloud for this). +To use this SDK, you need a Client id and a Client secret; they can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/apps) (it requires free registration in Aspose Cloud for this). ### Installation @@ -58,9 +57,10 @@ from AsposeEmailCloudSdk import api #EmailApi class is here from AsposeEmailCloudSdk import models #REST API models are here #... -app_sid = 'Your App SID' -app_key = 'Your App Key' -email_cloud = api.EmailCloud(app_key, app_sid) +client_secret = 'Your Client secret' +client_id = 'Your Client id' + +email_cloud = api.EmailCloud(client_secret, client_id) ``` #### Business cards recognition API diff --git a/sdk/AsposeEmailCloudSdk/api/api_base.py b/sdk/AsposeEmailCloudSdk/api/api_base.py index b10eddf..22bea0d 100644 --- a/sdk/AsposeEmailCloudSdk/api/api_base.py +++ b/sdk/AsposeEmailCloudSdk/api/api_base.py @@ -84,8 +84,8 @@ def call_api(): def _request_token(self): config = self.api_client.configuration request_url = "/connect/token" - form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['app_sid']), - ('client_secret', config.api_key['api_key'])] + form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['client_id']), + ('client_secret', config.api_key['client_secret'])] header_params = {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'} diff --git a/sdk/AsposeEmailCloudSdk/api/email_api.py b/sdk/AsposeEmailCloudSdk/api/email_api.py index fabb198..24d4a47 100644 --- a/sdk/AsposeEmailCloudSdk/api/email_api.py +++ b/sdk/AsposeEmailCloudSdk/api/email_api.py @@ -40,7 +40,7 @@ def __init__(self, api_client): super(EmailApi, self).__init__(api_client) def as_file(self, request: EmailAsFileRequest) -> str: - """Converts Email model to specified format and returns as file. + """Converts Email model to a specified format and returns as a file. :param request: Email model and format to convert. :type request: EmailAsFileRequest diff --git a/sdk/AsposeEmailCloudSdk/api/email_cloud.py b/sdk/AsposeEmailCloudSdk/api/email_cloud.py index 767ce45..24670ae 100644 --- a/sdk/AsposeEmailCloudSdk/api/email_cloud.py +++ b/sdk/AsposeEmailCloudSdk/api/email_cloud.py @@ -35,15 +35,15 @@ class EmailCloud(object): Aspose.Email Cloud API. """ - def __init__(self, app_key=None, app_sid=None, base_url=None, + def __init__(self, client_secret=None, client_id=None, base_url=None, api_version=None, debug=False): """ Initializes a new instance of the EmailCloud class. - :param app_key: The app key. - :type app_key: str - :param app_sid: The app sid. - :type app_sid: str + :param client_secret: The client secret. + :type client_secret: str + :param client_id: The client id. + :type client_id: str :param base_url: The base URL. :type base_url: str :param api_version: API version. @@ -51,8 +51,8 @@ def __init__(self, app_key=None, app_sid=None, base_url=None, :param debug: If debug mode is enabled. False by default. :type debug: bool """ - configuration = Configuration(app_key=app_key, - app_sid=app_sid, + configuration = Configuration(client_secret=client_secret, + client_id=client_id, base_url=base_url, api_version=api_version, debug=debug) @@ -106,7 +106,7 @@ def email(self) -> EmailApi: @property def disposable_email(self) -> DisposableEmailApi: """ - Check email address is disposable operations + Checks if an email is a disposable one """ return self._disposable_email diff --git a/sdk/AsposeEmailCloudSdk/configuration.py b/sdk/AsposeEmailCloudSdk/configuration.py index 94e2d5d..677373b 100644 --- a/sdk/AsposeEmailCloudSdk/configuration.py +++ b/sdk/AsposeEmailCloudSdk/configuration.py @@ -43,7 +43,7 @@ class Configuration(object): default_api_version = 'v4.0' - def __init__(self, app_key=None, app_sid=None, base_url=None, + def __init__(self, client_secret=None, client_id=None, base_url=None, api_version=None, debug=False): """Constructor""" # Base url @@ -72,8 +72,8 @@ def __init__(self, app_key=None, app_sid=None, base_url=None, # Authentication Settings # dict to store API key(s) - self.api_key = {'api_key': app_key if app_key else "", - 'app_sid': app_sid if app_sid else ""} + self.api_key = {'client_secret': client_secret if client_secret else "", + 'client_id': client_id if client_id else ""} # dict to store API prefix (e.g. Bearer) self.api_key_prefix = {} @@ -101,7 +101,7 @@ def __init__(self, app_key=None, app_sid=None, base_url=None, self.__debug = debug # On-premise switch - self.on_premise = not (app_key or app_sid) and base_url + self.on_premise = not (client_secret or client_id) and base_url # SSL/TLS verification # Set this to false to skip verifying SSL certificate when calling API diff --git a/sdk/docs/AiBcrApi.md b/sdk/docs/AiBcrApi.md index ee5cc8e..cf75e12 100644 --- a/sdk/docs/AiBcrApi.md +++ b/sdk/docs/AiBcrApi.md @@ -84,7 +84,7 @@ result = models.ContactList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiBcrParseRequest( @@ -196,7 +196,7 @@ result = models.StorageFileLocationList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiBcrParseStorageRequest( diff --git a/sdk/docs/AiNameApi.md b/sdk/docs/AiNameApi.md index 2b358e7..c6ff65f 100644 --- a/sdk/docs/AiNameApi.md +++ b/sdk/docs/AiNameApi.md @@ -57,7 +57,7 @@ result = models.AiNameWeightedVariants( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameCompleteRequest( @@ -135,7 +135,7 @@ result = models.AiNameWeightedVariants( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameExpandRequest( @@ -229,7 +229,7 @@ result = models.AiNameWeightedVariants( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameParsedRequest( @@ -319,7 +319,7 @@ result = models.AiNameFormatted( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameFormatRequest( @@ -404,7 +404,7 @@ result = models.AiNameFormatted( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameParsedRequest( @@ -486,7 +486,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameGenderizeRequest( @@ -566,7 +566,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameParsedRequest( @@ -652,7 +652,7 @@ result = models.AiNameMatchResult( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameMatchRequest( @@ -760,7 +760,7 @@ result = models.AiNameMatchResult( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameMatchParsedRequest( @@ -881,7 +881,7 @@ result = models.AiNameComponentList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameParseRequest( @@ -964,7 +964,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.AiNameParseEmailAddressRequest( diff --git a/sdk/docs/CalendarApi.md b/sdk/docs/CalendarApi.md index 8273dde..76d6109 100644 --- a/sdk/docs/CalendarApi.md +++ b/sdk/docs/CalendarApi.md @@ -84,7 +84,7 @@ result = models.AlternateView( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarAsAlternateRequest( @@ -191,7 +191,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarAsFileRequest( @@ -312,7 +312,7 @@ result = models.MapiCalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: calendar_dto = models.CalendarDto( @@ -412,7 +412,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarConvertRequest( @@ -491,7 +491,7 @@ result = models.CalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarFromFileRequest( @@ -591,7 +591,7 @@ result = models.CalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarGetRequest( @@ -693,7 +693,7 @@ result = models.AlternateView( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarGetAsAlternateRequest( @@ -771,7 +771,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarGetAsFileRequest( @@ -862,7 +862,7 @@ result = models.CalendarStorageList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarGetListRequest( @@ -962,7 +962,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CalendarSaveRequest( diff --git a/sdk/docs/ClientAccountApi.md b/sdk/docs/ClientAccountApi.md index effbe0c..b0fe773 100644 --- a/sdk/docs/ClientAccountApi.md +++ b/sdk/docs/ClientAccountApi.md @@ -61,7 +61,7 @@ result = models.EmailClientAccount( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientAccountGetRequest( @@ -163,7 +163,7 @@ result = models.EmailClientMultiAccount( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientAccountGetMultiRequest( @@ -255,7 +255,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientAccountSaveRequest( @@ -346,7 +346,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientAccountSaveMultiRequest( diff --git a/sdk/docs/ClientFolderApi.md b/sdk/docs/ClientFolderApi.md index 9017b13..591ddcd 100644 --- a/sdk/docs/ClientFolderApi.md +++ b/sdk/docs/ClientFolderApi.md @@ -43,7 +43,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientFolderCreateRequest( @@ -101,7 +101,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientFolderDeleteRequest( @@ -169,7 +169,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientFolderGetListRequest( diff --git a/sdk/docs/ClientMessageApi.md b/sdk/docs/ClientMessageApi.md index 371eafa..eb8662e 100644 --- a/sdk/docs/ClientMessageApi.md +++ b/sdk/docs/ClientMessageApi.md @@ -77,7 +77,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageAppendRequest( @@ -173,7 +173,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageAppendFileRequest( @@ -235,7 +235,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageDeleteRequest( @@ -308,7 +308,7 @@ result = models.MailMessageBase( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageFetchRequest( @@ -376,7 +376,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageFetchFileRequest( @@ -451,7 +451,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageListRequest( @@ -516,7 +516,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageMoveRequest( @@ -596,7 +596,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageSendRequest( @@ -674,7 +674,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageSendFileRequest( @@ -732,7 +732,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientMessageSetIsReadRequest( diff --git a/sdk/docs/ClientThreadApi.md b/sdk/docs/ClientThreadApi.md index 4eaeabb..6f3ba20 100644 --- a/sdk/docs/ClientThreadApi.md +++ b/sdk/docs/ClientThreadApi.md @@ -43,7 +43,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientThreadDeleteRequest( @@ -135,7 +135,7 @@ result = models.EmailThreadList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientThreadGetListRequest( @@ -229,7 +229,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientThreadGetMessagesRequest( @@ -290,7 +290,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientThreadMoveRequest( @@ -350,7 +350,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ClientThreadSetIsReadRequest( diff --git a/sdk/docs/ContactApi.md b/sdk/docs/ContactApi.md index 8944192..a570faa 100644 --- a/sdk/docs/ContactApi.md +++ b/sdk/docs/ContactApi.md @@ -71,7 +71,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactAsFileRequest( @@ -201,7 +201,7 @@ result = models.MapiContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: contact_dto = models.ContactDto( @@ -299,7 +299,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactConvertRequest( @@ -392,7 +392,7 @@ result = models.ContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactFromFileRequest( @@ -518,7 +518,7 @@ result = models.ContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactGetRequest( @@ -610,7 +610,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactGetAsFileRequest( @@ -715,7 +715,7 @@ result = models.ContactStorageList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactGetListRequest( @@ -840,7 +840,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ContactSaveRequest( diff --git a/sdk/docs/DisposableEmailApi.md b/sdk/docs/DisposableEmailApi.md index 808babf..ed650f9 100644 --- a/sdk/docs/DisposableEmailApi.md +++ b/sdk/docs/DisposableEmailApi.md @@ -1,6 +1,6 @@ # AsposeEmailCloudSdk.DisposableEmailApi (EmailCloud.disposable_email) -Check email address is disposable operations +Checks if an email is a disposable one ## is_disposable @@ -50,7 +50,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.DisposableEmailIsDisposableRequest( diff --git a/sdk/docs/EmailApi.md b/sdk/docs/EmailApi.md index adb3910..6e5230d 100644 --- a/sdk/docs/EmailApi.md +++ b/sdk/docs/EmailApi.md @@ -5,7 +5,7 @@ Email document (*.eml) operations. ## as_file -Description: Converts Email model to specified format and returns as file. +Description: Converts Email model to a specified format and returns as a file. Returns: File stream in specified format. @@ -62,7 +62,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailAsFileRequest( @@ -189,7 +189,7 @@ result = models.MapiMessageDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: email_dto = models.EmailDto( @@ -293,7 +293,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailConvertRequest( @@ -377,7 +377,7 @@ result = models.EmailDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailFromFileRequest( @@ -485,7 +485,7 @@ result = models.EmailDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailGetRequest( @@ -567,7 +567,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailGetAsFileRequest( @@ -662,7 +662,7 @@ result = models.EmailStorageList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailGetListRequest( @@ -770,7 +770,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailSaveRequest( diff --git a/sdk/docs/EmailApi_list.md b/sdk/docs/EmailApi_list.md index 3e45826..a77e29f 100644 --- a/sdk/docs/EmailApi_list.md +++ b/sdk/docs/EmailApi_list.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.aspose.cloud/v4.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**as_file**](EmailApi.md#as_file)| **PUT** /email/as-file| Converts Email model to specified format and returns as file. +[**as_file**](EmailApi.md#as_file)| **PUT** /email/as-file| Converts Email model to a specified format and returns as a file. [**as_mapi**](EmailApi.md#as_mapi)| **PUT** /email/as-mapi| Converts EmailDto to MapiMessageDto. [**convert**](EmailApi.md#convert)| **PUT** /email/convert| Converts email document to specified format and returns as file [**from_file**](EmailApi.md#from_file)| **PUT** /email/from-file| Converts email document to a model representation diff --git a/sdk/docs/EmailConfigApi.md b/sdk/docs/EmailConfigApi.md index 0d71ad5..f88375a 100644 --- a/sdk/docs/EmailConfigApi.md +++ b/sdk/docs/EmailConfigApi.md @@ -24,7 +24,8 @@ See parameter model documentation at [EmailConfigDiscoverRequest](EmailConfigDis Parameter initialization example: ```python -request = models.EmailConfigDiscoverRequest() +request = models.EmailConfigDiscoverRequest( + address='address@gmail.com') ``` @@ -88,10 +89,11 @@ result = models.EmailAccountConfigList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: -request = models.EmailConfigDiscoverRequest() +request = models.EmailConfigDiscoverRequest( + address='address@gmail.com') // Call method: result = api.email_config.discover(request) @@ -233,7 +235,7 @@ result = models.EmailAccountConfigList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailConfigDiscoverOauthRequest( @@ -381,7 +383,7 @@ result = models.EmailAccountConfigList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.EmailConfigDiscoverPasswordRequest( diff --git a/sdk/docs/EmailConfigDiscoverRequest.md b/sdk/docs/EmailConfigDiscoverRequest.md index af31ef0..da231df 100644 --- a/sdk/docs/EmailConfigDiscoverRequest.md +++ b/sdk/docs/EmailConfigDiscoverRequest.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes ## Example ```python -request = models.EmailConfigDiscoverRequest() +request = models.EmailConfigDiscoverRequest( + address='address@gmail.com') ``` diff --git a/sdk/docs/FileApi.md b/sdk/docs/FileApi.md index 6a74c47..8068505 100644 --- a/sdk/docs/FileApi.md +++ b/sdk/docs/FileApi.md @@ -41,7 +41,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CopyFileRequest( @@ -94,7 +94,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.DeleteFileRequest( @@ -149,7 +149,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.DownloadFileRequest( @@ -202,7 +202,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MoveFileRequest( @@ -268,7 +268,7 @@ result = Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.UploadFileRequest( diff --git a/sdk/docs/FolderApi.md b/sdk/docs/FolderApi.md index 2038121..0e9487e 100644 --- a/sdk/docs/FolderApi.md +++ b/sdk/docs/FolderApi.md @@ -41,7 +41,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CopyFolderRequest( @@ -94,7 +94,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.CreateFolderRequest( @@ -146,7 +146,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.DeleteFolderRequest( @@ -216,7 +216,7 @@ result = models.FilesList( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.GetFilesListRequest( @@ -278,7 +278,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MoveFolderRequest( diff --git a/sdk/docs/MapiCalendarApi.md b/sdk/docs/MapiCalendarApi.md index 879fa5b..5d62b9e 100644 --- a/sdk/docs/MapiCalendarApi.md +++ b/sdk/docs/MapiCalendarApi.md @@ -93,7 +93,7 @@ result = models.CalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: mapi_calendar_dto = models.MapiCalendarDto( @@ -220,7 +220,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiCalendarAsFileRequest( @@ -336,7 +336,7 @@ result = models.MapiCalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiCalendarFromFileRequest( @@ -456,7 +456,7 @@ result = models.MapiCalendarDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiCalendarGetRequest( @@ -569,7 +569,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiCalendarSaveRequest( diff --git a/sdk/docs/MapiContactApi.md b/sdk/docs/MapiContactApi.md index 482463c..7a48042 100644 --- a/sdk/docs/MapiContactApi.md +++ b/sdk/docs/MapiContactApi.md @@ -90,7 +90,7 @@ result = models.ContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: mapi_contact_dto = models.MapiContactDto( @@ -199,7 +199,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiContactAsFileRequest( @@ -286,7 +286,7 @@ result = models.MapiContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiContactFromFileRequest( @@ -378,7 +378,7 @@ result = models.MapiContactDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiContactGetRequest( @@ -462,7 +462,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiContactSaveRequest( diff --git a/sdk/docs/MapiMessageApi.md b/sdk/docs/MapiMessageApi.md index 2e49b7a..7e6e9b7 100644 --- a/sdk/docs/MapiMessageApi.md +++ b/sdk/docs/MapiMessageApi.md @@ -96,7 +96,7 @@ result = models.EmailDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: mapi_message = models.MapiMessageDto( @@ -226,7 +226,7 @@ Return type: **Stream** Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiMessageAsFileRequest( @@ -343,7 +343,7 @@ result = models.MapiMessageDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiMessageFromFileRequest( @@ -465,7 +465,7 @@ result = models.MapiMessageDto( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiMessageGetRequest( @@ -579,7 +579,7 @@ Return type: void (empty response body) Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.MapiMessageSaveRequest( diff --git a/sdk/docs/README.md b/sdk/docs/README.md index 4b009fe..7330836 100644 --- a/sdk/docs/README.md +++ b/sdk/docs/README.md @@ -1,13 +1,13 @@ # Reference documentation for Aspose.Email Cloud API `EmailCloud` is the main API class. It provides an access to all of Aspose.Email Cloud functions. -`app_key` and `app_sid` credentials should be obtained from [dashboard](https://dashboard.aspose.cloud/#/) to use `EmailCloud`: +`client_secret` and `client_id` credentials should be obtained from [dashboard](https://dashboard.aspose.cloud/#/) to use `EmailCloud`: ```python -app_key = 'Your App Key' -app_sid = 'Your App SID' +client_secret = 'Your Client secret' +client_id = 'Your Client id' -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) ``` All Aspose.Email Cloud functions are divided into groups and represented as `EmailCloud` fields: @@ -21,7 +21,7 @@ API | Description [EmailCloud.**calendar**](CalendarApi_list.md) | iCalendar document operations. [EmailCloud.**contact**](ContactApi_list.md) | Contact document operations. Supported formats: VCard, MSG, WebDav [EmailCloud.**email**](EmailApi_list.md) | Email document (*.eml) operations. -[EmailCloud.**disposable_email**](DisposableEmailApi_list.md) | Check email address is disposable operations +[EmailCloud.**disposable_email**](DisposableEmailApi_list.md) | Checks if an email is a disposable one [EmailCloud.**email_config**](EmailConfigApi_list.md) | Email server configuration discovery. diff --git a/sdk/docs/StorageApi.md b/sdk/docs/StorageApi.md index 0e63642..6d5fa91 100644 --- a/sdk/docs/StorageApi.md +++ b/sdk/docs/StorageApi.md @@ -52,7 +52,7 @@ result = models.DiscUsage( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.GetDiscUsageRequest( @@ -127,7 +127,7 @@ result = models.FileVersions( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.GetFileVersionsRequest( @@ -202,7 +202,7 @@ result = models.ObjectExist( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.ObjectExistsRequest( @@ -269,7 +269,7 @@ result = models.StorageExist( Method call example: ```python -api = EmailCloud(app_key, app_sid) +api = EmailCloud(client_secret, client_id) // Prepare parameters: request = models.StorageExistsRequest( diff --git a/sdk/setup.py b/sdk/setup.py index 906e1af..5996dd5 100644 --- a/sdk/setup.py +++ b/sdk/setup.py @@ -8,7 +8,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "aspose-email-cloud" -VERSION = "20.10.0" +VERSION = "20.12.0.127" # To install the library, run the following # # python setup.py install diff --git a/tests/conftest.py b/tests/conftest.py index 9ebc546..1a9ba70 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,8 +31,8 @@ def pytest_configure(config): @pytest.fixture(scope="class") def td(request): config = _get_config(request) - app_sid = config["appsid"] - app_key = config["appkey"] + app_sid = config["clientid"] + app_key = config["clientsecret"] api_base_url = config.get("apibaseurl", "https://api-qa.aspose.cloud") email_cloud = api.EmailCloud(app_key, app_sid, api_base_url) auth_url = config.get("authurl")