Skip to content

Commit 23eaaa3

Browse files
Merge pull request #16 from aspose-email-cloud/develop
Develop
2 parents 76fb707 + f2b58a1 commit 23eaaa3

30 files changed

+143
-139
lines changed

.github/workflows/pythonapp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
python -m pip install -r tests/requirements.txt
2121
- name: Test with pytest
2222
env:
23-
appSid: ${{secrets.appSid}}
24-
appKey: ${{secrets.appKey}}
23+
clientId: ${{secrets.appSid}}
24+
clientSecret: ${{secrets.appKey}}
2525
apiBaseUrl: "https://api-qa.aspose.cloud"
2626
run: |
2727
python -m pytest --verbose --color=yes -m pipeline tests

.github/workflows/pythonpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
pip install -r tests/requirements.txt
2222
- name : Run Tests
2323
env:
24-
appSid: ${{secrets.appSidProd}}
25-
appKey: ${{secrets.appKeyProd}}
24+
clientId: ${{secrets.appSidProd}}
25+
clientSecret: ${{secrets.appKeyProd}}
2626
apiBaseUrl: "https://api.aspose.cloud"
2727
run: |
2828
python -m pytest -m pipeline tests

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ target/
6969
.idea/
7070
.vscode/
7171
.pytest_cache/
72-
.venv/
72+
.venv/
73+
.run/

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ Aspose.Email Cloud is a REST API for creating email applications that work with
2222
- Email configuration discovery.
2323
- Disposable email address detection.
2424

25-
## New features in version 20.10
25+
## What's new in version 20.12
2626

27-
Aspose.Email Cloud 20.10.0 comes with SDK improvements:
27+
Aspose.Email Cloud 20.12.0 comes with SDK breaking changes:
28+
- AppKey renamed to ClientSecret.
29+
- AppSID renamed to ClientId.
2830

29-
- Typescript, PHP, Java SDKs now have model builders to simplify their initialization.
30-
- All SDK methods now have code examples with parameters initialization.
31-
- Some models now have initialization examples for all SDKs.
32-
- SDK reference documentation with examples now available at url [docs.aspose.cloud/email/reference-api](https://docs.aspose.cloud/email/reference-api/)
31+
Some [SDK reference documentation](https://docs.aspose.cloud/email/reference-api/) improvements were made.
3332

34-
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-10-release-notes/).
33+
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-12-release-notes/).
3534

3635
## How to use the SDK?
3736
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
4039

4140
### Prerequisites
4241

43-
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).
42+
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).
4443

4544
### Installation
4645

@@ -58,9 +57,10 @@ from AsposeEmailCloudSdk import api #EmailApi class is here
5857
from AsposeEmailCloudSdk import models #REST API models are here
5958

6059
#...
61-
app_sid = 'Your App SID'
62-
app_key = 'Your App Key'
63-
email_cloud = api.EmailCloud(app_key, app_sid)
60+
client_secret = 'Your Client secret'
61+
client_id = 'Your Client id'
62+
63+
email_cloud = api.EmailCloud(client_secret, client_id)
6464
```
6565

6666
#### Business cards recognition API

sdk/AsposeEmailCloudSdk/api/api_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def call_api():
8484
def _request_token(self):
8585
config = self.api_client.configuration
8686
request_url = "/connect/token"
87-
form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['app_sid']),
88-
('client_secret', config.api_key['api_key'])]
87+
form_params = [('grant_type', 'client_credentials'), ('client_id', config.api_key['client_id']),
88+
('client_secret', config.api_key['client_secret'])]
8989

9090
header_params = {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'}
9191

sdk/AsposeEmailCloudSdk/api/email_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, api_client):
4040
super(EmailApi, self).__init__(api_client)
4141

4242
def as_file(self, request: EmailAsFileRequest) -> str:
43-
"""Converts Email model to specified format and returns as file.
43+
"""Converts Email model to a specified format and returns as a file.
4444
4545
:param request: Email model and format to convert.
4646
:type request: EmailAsFileRequest

sdk/AsposeEmailCloudSdk/api/email_cloud.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ class EmailCloud(object):
3535
Aspose.Email Cloud API.
3636
"""
3737

38-
def __init__(self, app_key=None, app_sid=None, base_url=None,
38+
def __init__(self, client_secret=None, client_id=None, base_url=None,
3939
api_version=None, debug=False):
4040
"""
4141
Initializes a new instance of the EmailCloud class.
4242
43-
:param app_key: The app key.
44-
:type app_key: str
45-
:param app_sid: The app sid.
46-
:type app_sid: str
43+
:param client_secret: The client secret.
44+
:type client_secret: str
45+
:param client_id: The client id.
46+
:type client_id: str
4747
:param base_url: The base URL.
4848
:type base_url: str
4949
:param api_version: API version.
5050
:type api_version: str
5151
:param debug: If debug mode is enabled. False by default.
5252
:type debug: bool
5353
"""
54-
configuration = Configuration(app_key=app_key,
55-
app_sid=app_sid,
54+
configuration = Configuration(client_secret=client_secret,
55+
client_id=client_id,
5656
base_url=base_url,
5757
api_version=api_version,
5858
debug=debug)
@@ -106,7 +106,7 @@ def email(self) -> EmailApi:
106106
@property
107107
def disposable_email(self) -> DisposableEmailApi:
108108
"""
109-
Check email address is disposable operations
109+
Checks if an email is a disposable one
110110
"""
111111
return self._disposable_email
112112

sdk/AsposeEmailCloudSdk/configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Configuration(object):
4343

4444
default_api_version = 'v4.0'
4545

46-
def __init__(self, app_key=None, app_sid=None, base_url=None,
46+
def __init__(self, client_secret=None, client_id=None, base_url=None,
4747
api_version=None, debug=False):
4848
"""Constructor"""
4949
# Base url
@@ -72,8 +72,8 @@ def __init__(self, app_key=None, app_sid=None, base_url=None,
7272

7373
# Authentication Settings
7474
# dict to store API key(s)
75-
self.api_key = {'api_key': app_key if app_key else "",
76-
'app_sid': app_sid if app_sid else ""}
75+
self.api_key = {'client_secret': client_secret if client_secret else "",
76+
'client_id': client_id if client_id else ""}
7777
# dict to store API prefix (e.g. Bearer)
7878
self.api_key_prefix = {}
7979

@@ -101,7 +101,7 @@ def __init__(self, app_key=None, app_sid=None, base_url=None,
101101
self.__debug = debug
102102

103103
# On-premise switch
104-
self.on_premise = not (app_key or app_sid) and base_url
104+
self.on_premise = not (client_secret or client_id) and base_url
105105

106106
# SSL/TLS verification
107107
# Set this to false to skip verifying SSL certificate when calling API

sdk/docs/AiBcrApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ result = models.ContactList(
8484
<summary>Method call example:</summary>
8585

8686
```python
87-
api = EmailCloud(app_key, app_sid)
87+
api = EmailCloud(client_secret, client_id)
8888

8989
// Prepare parameters:
9090
request = models.AiBcrParseRequest(
@@ -196,7 +196,7 @@ result = models.StorageFileLocationList(
196196
<summary>Method call example:</summary>
197197

198198
```python
199-
api = EmailCloud(app_key, app_sid)
199+
api = EmailCloud(client_secret, client_id)
200200

201201
// Prepare parameters:
202202
request = models.AiBcrParseStorageRequest(

sdk/docs/AiNameApi.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ result = models.AiNameWeightedVariants(
5757
<summary>Method call example:</summary>
5858

5959
```python
60-
api = EmailCloud(app_key, app_sid)
60+
api = EmailCloud(client_secret, client_id)
6161

6262
// Prepare parameters:
6363
request = models.AiNameCompleteRequest(
@@ -135,7 +135,7 @@ result = models.AiNameWeightedVariants(
135135
<summary>Method call example:</summary>
136136

137137
```python
138-
api = EmailCloud(app_key, app_sid)
138+
api = EmailCloud(client_secret, client_id)
139139

140140
// Prepare parameters:
141141
request = models.AiNameExpandRequest(
@@ -229,7 +229,7 @@ result = models.AiNameWeightedVariants(
229229
<summary>Method call example:</summary>
230230

231231
```python
232-
api = EmailCloud(app_key, app_sid)
232+
api = EmailCloud(client_secret, client_id)
233233

234234
// Prepare parameters:
235235
request = models.AiNameParsedRequest(
@@ -319,7 +319,7 @@ result = models.AiNameFormatted(
319319
<summary>Method call example:</summary>
320320

321321
```python
322-
api = EmailCloud(app_key, app_sid)
322+
api = EmailCloud(client_secret, client_id)
323323

324324
// Prepare parameters:
325325
request = models.AiNameFormatRequest(
@@ -404,7 +404,7 @@ result = models.AiNameFormatted(
404404
<summary>Method call example:</summary>
405405

406406
```python
407-
api = EmailCloud(app_key, app_sid)
407+
api = EmailCloud(client_secret, client_id)
408408

409409
// Prepare parameters:
410410
request = models.AiNameParsedRequest(
@@ -486,7 +486,7 @@ result =
486486
<summary>Method call example:</summary>
487487

488488
```python
489-
api = EmailCloud(app_key, app_sid)
489+
api = EmailCloud(client_secret, client_id)
490490

491491
// Prepare parameters:
492492
request = models.AiNameGenderizeRequest(
@@ -566,7 +566,7 @@ result =
566566
<summary>Method call example:</summary>
567567

568568
```python
569-
api = EmailCloud(app_key, app_sid)
569+
api = EmailCloud(client_secret, client_id)
570570

571571
// Prepare parameters:
572572
request = models.AiNameParsedRequest(
@@ -652,7 +652,7 @@ result = models.AiNameMatchResult(
652652
<summary>Method call example:</summary>
653653

654654
```python
655-
api = EmailCloud(app_key, app_sid)
655+
api = EmailCloud(client_secret, client_id)
656656

657657
// Prepare parameters:
658658
request = models.AiNameMatchRequest(
@@ -760,7 +760,7 @@ result = models.AiNameMatchResult(
760760
<summary>Method call example:</summary>
761761

762762
```python
763-
api = EmailCloud(app_key, app_sid)
763+
api = EmailCloud(client_secret, client_id)
764764

765765
// Prepare parameters:
766766
request = models.AiNameMatchParsedRequest(
@@ -881,7 +881,7 @@ result = models.AiNameComponentList(
881881
<summary>Method call example:</summary>
882882

883883
```python
884-
api = EmailCloud(app_key, app_sid)
884+
api = EmailCloud(client_secret, client_id)
885885

886886
// Prepare parameters:
887887
request = models.AiNameParseRequest(
@@ -964,7 +964,7 @@ result =
964964
<summary>Method call example:</summary>
965965

966966
```python
967-
api = EmailCloud(app_key, app_sid)
967+
api = EmailCloud(client_secret, client_id)
968968

969969
// Prepare parameters:
970970
request = models.AiNameParseEmailAddressRequest(

0 commit comments

Comments
 (0)