gmt-python-sdk 0.15.0__tar.gz → 0.16.0__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.
- gmt_python_sdk-0.16.0/.release-please-manifest.json +3 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/CHANGELOG.md +8 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/PKG-INFO +1 -1
- gmt_python_sdk-0.16.0/api.md +94 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/pyproject.toml +1 -1
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_client.py +1 -1
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_version.py +1 -1
- gmt_python_sdk-0.16.0/src/gmt/resources/profile.py +370 -0
- gmt_python_sdk-0.16.0/src/gmt/resources/purchases/__init__.py +33 -0
- gmt_python_sdk-0.16.0/src/gmt/resources/purchases/bulk.py +394 -0
- {gmt_python_sdk-0.15.0/src/gmt/resources → gmt_python_sdk-0.16.0/src/gmt/resources/purchases}/purchases.py +45 -13
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/__init__.py +5 -0
- gmt_python_sdk-0.16.0/src/gmt/types/profile_change_login_params.py +12 -0
- gmt_python_sdk-0.16.0/src/gmt/types/profile_change_login_response.py +10 -0
- gmt_python_sdk-0.16.0/src/gmt/types/profile_change_password_params.py +16 -0
- gmt_python_sdk-0.16.0/src/gmt/types/profile_change_password_response.py +10 -0
- gmt_python_sdk-0.16.0/src/gmt/types/profile_unbind_telegram_response.py +10 -0
- gmt_python_sdk-0.16.0/src/gmt/types/purchases/__init__.py +7 -0
- gmt_python_sdk-0.16.0/src/gmt/types/purchases/bulk_create_params.py +25 -0
- gmt_python_sdk-0.16.0/src/gmt/types/purchases/bulk_create_response.py +76 -0
- gmt_python_sdk-0.16.0/src/gmt/types/purchases/bulk_retrieve_response.py +76 -0
- gmt_python_sdk-0.16.0/tests/api_resources/purchases/__init__.py +1 -0
- gmt_python_sdk-0.16.0/tests/api_resources/purchases/test_bulk.py +286 -0
- gmt_python_sdk-0.16.0/tests/api_resources/test_profile.py +277 -0
- gmt_python_sdk-0.15.0/.release-please-manifest.json +0 -3
- gmt_python_sdk-0.15.0/api.md +0 -72
- gmt_python_sdk-0.15.0/src/gmt/resources/profile.py +0 -141
- gmt_python_sdk-0.15.0/tests/api_resources/test_profile.py +0 -80
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/.gitignore +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/CONTRIBUTING.md +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/LICENSE +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/README.md +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/SECURITY.md +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/bin/check-release-environment +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/bin/publish-pypi +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/examples/.keep +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/release-please-config.json +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/requirements-dev.lock +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/__init__.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_base_client.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_compat.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_constants.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_exceptions.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_files.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_models.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_qs.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_resource.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_streaming.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_types.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/__init__.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_compat.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_datetime_parse.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_json.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_logs.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_proxy.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_reflection.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_resources_proxy.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_streams.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_sync.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_transform.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_typing.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/_utils/_utils.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/lib/.keep +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/pagination.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/py.typed +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/resources/__init__.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/resources/accounts.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/resources/service.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/resources/webhooks.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/account_list_countries_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/account_list_countries_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/account_list_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/account_list_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/account_retrieve_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/profile_retrieve_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_create_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_create_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_list_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_list_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_refund_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/service_get_server_time_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/service_health_check_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/webhook_test_params.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/src/gmt/types/webhook_test_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/__init__.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/api_resources/__init__.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/api_resources/test_accounts.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/api_resources/test_purchases.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/api_resources/test_service.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/api_resources/test_webhooks.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/conftest.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/sample_file.txt +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_client.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_deepcopy.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_extract_files.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_files.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_models.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_qs.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_required_args.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_response.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_streaming.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_transform.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_utils/test_json.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_utils/test_proxy.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/test_utils/test_typing.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/tests/utils.py +0 -0
- {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.16.0}/uv.lock +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0 (2026-02-09)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.15.0...v0.16.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.15.0...v0.16.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([6815298](https://github.com/cameo6/gmt-python-sdk/commit/68152986071f9667f88067fab0b0eb641949e5f6))
|
|
10
|
+
|
|
3
11
|
## 0.15.0 (2026-02-09)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.14.0...v0.15.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.14.0...v0.15.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gmt-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: The official Python library for the gmt API
|
|
5
5
|
Project-URL: Homepage, https://github.com/cameo6/gmt-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/cameo6/gmt-python-sdk
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Service
|
|
2
|
+
|
|
3
|
+
Types:
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from gmt.types import ServiceGetServerTimeResponse, ServiceHealthCheckResponse
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Methods:
|
|
10
|
+
|
|
11
|
+
- <code title="get /v1/service/time">client.service.<a href="./src/gmt/resources/service.py">get_server_time</a>() -> <a href="./src/gmt/types/service_get_server_time_response.py">ServiceGetServerTimeResponse</a></code>
|
|
12
|
+
- <code title="get /v1/service/health">client.service.<a href="./src/gmt/resources/service.py">health_check</a>() -> <a href="./src/gmt/types/service_health_check_response.py">ServiceHealthCheckResponse</a></code>
|
|
13
|
+
|
|
14
|
+
# Accounts
|
|
15
|
+
|
|
16
|
+
Types:
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from gmt.types import AccountRetrieveResponse, AccountListResponse, AccountListCountriesResponse
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Methods:
|
|
23
|
+
|
|
24
|
+
- <code title="get /v1/accounts/{country_code}">client.accounts.<a href="./src/gmt/resources/accounts.py">retrieve</a>(country_code) -> <a href="./src/gmt/types/account_retrieve_response.py">AccountRetrieveResponse</a></code>
|
|
25
|
+
- <code title="get /v1/accounts/">client.accounts.<a href="./src/gmt/resources/accounts.py">list</a>(\*\*<a href="src/gmt/types/account_list_params.py">params</a>) -> <a href="./src/gmt/types/account_list_response.py">SyncPageNumber[AccountListResponse]</a></code>
|
|
26
|
+
- <code title="get /v1/accounts/countries">client.accounts.<a href="./src/gmt/resources/accounts.py">list_countries</a>(\*\*<a href="src/gmt/types/account_list_countries_params.py">params</a>) -> <a href="./src/gmt/types/account_list_countries_response.py">SyncPageNumber[AccountListCountriesResponse]</a></code>
|
|
27
|
+
|
|
28
|
+
# Profile
|
|
29
|
+
|
|
30
|
+
Types:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from gmt.types import (
|
|
34
|
+
ProfileRetrieveResponse,
|
|
35
|
+
ProfileChangeLoginResponse,
|
|
36
|
+
ProfileChangePasswordResponse,
|
|
37
|
+
ProfileUnbindTelegramResponse,
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Methods:
|
|
42
|
+
|
|
43
|
+
- <code title="get /v1/profile/">client.profile.<a href="./src/gmt/resources/profile.py">retrieve</a>() -> <a href="./src/gmt/types/profile_retrieve_response.py">ProfileRetrieveResponse</a></code>
|
|
44
|
+
- <code title="patch /v1/profile/change-login">client.profile.<a href="./src/gmt/resources/profile.py">change_login</a>(\*\*<a href="src/gmt/types/profile_change_login_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_login_response.py">ProfileChangeLoginResponse</a></code>
|
|
45
|
+
- <code title="patch /v1/profile/change-password">client.profile.<a href="./src/gmt/resources/profile.py">change_password</a>(\*\*<a href="src/gmt/types/profile_change_password_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_password_response.py">ProfileChangePasswordResponse</a></code>
|
|
46
|
+
- <code title="patch /v1/profile/unbind-telegram">client.profile.<a href="./src/gmt/resources/profile.py">unbind_telegram</a>() -> <a href="./src/gmt/types/profile_unbind_telegram_response.py">ProfileUnbindTelegramResponse</a></code>
|
|
47
|
+
|
|
48
|
+
# Purchases
|
|
49
|
+
|
|
50
|
+
Types:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from gmt.types import (
|
|
54
|
+
PurchaseCreateResponse,
|
|
55
|
+
PurchaseRetrieveResponse,
|
|
56
|
+
PurchaseListResponse,
|
|
57
|
+
PurchaseRefundResponse,
|
|
58
|
+
PurchaseRequestVerificationCodeResponse,
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Methods:
|
|
63
|
+
|
|
64
|
+
- <code title="post /v1/purchases/">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">create</a>(\*\*<a href="src/gmt/types/purchase_create_params.py">params</a>) -> <a href="./src/gmt/types/purchase_create_response.py">PurchaseCreateResponse</a></code>
|
|
65
|
+
- <code title="get /v1/purchases/{purchase_id}">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">retrieve</a>(purchase_id) -> <a href="./src/gmt/types/purchase_retrieve_response.py">PurchaseRetrieveResponse</a></code>
|
|
66
|
+
- <code title="get /v1/purchases/">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">list</a>(\*\*<a href="src/gmt/types/purchase_list_params.py">params</a>) -> <a href="./src/gmt/types/purchase_list_response.py">SyncPageNumber[PurchaseListResponse]</a></code>
|
|
67
|
+
- <code title="post /v1/purchases/{purchase_id}/refund">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">refund</a>(purchase_id) -> <a href="./src/gmt/types/purchase_refund_response.py">PurchaseRefundResponse</a></code>
|
|
68
|
+
- <code title="post /v1/purchases/{purchase_id}/request-code">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">request_verification_code</a>(purchase_id, \*\*<a href="src/gmt/types/purchase_request_verification_code_params.py">params</a>) -> <a href="./src/gmt/types/purchase_request_verification_code_response.py">PurchaseRequestVerificationCodeResponse</a></code>
|
|
69
|
+
|
|
70
|
+
## Bulk
|
|
71
|
+
|
|
72
|
+
Types:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from gmt.types.purchases import BulkCreateResponse, BulkRetrieveResponse
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Methods:
|
|
79
|
+
|
|
80
|
+
- <code title="post /v1/purchases/bulk">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">create</a>(\*\*<a href="src/gmt/types/purchases/bulk_create_params.py">params</a>) -> <a href="./src/gmt/types/purchases/bulk_create_response.py">BulkCreateResponse</a></code>
|
|
81
|
+
- <code title="get /v1/purchases/bulk/{purchaseId}">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">retrieve</a>(purchase_id) -> <a href="./src/gmt/types/purchases/bulk_retrieve_response.py">BulkRetrieveResponse</a></code>
|
|
82
|
+
- <code title="get /v1/purchases/bulk/{purchaseId}/download">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">download</a>(purchase_id) -> None</code>
|
|
83
|
+
|
|
84
|
+
# Webhooks
|
|
85
|
+
|
|
86
|
+
Types:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from gmt.types import WebhookTestResponse
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Methods:
|
|
93
|
+
|
|
94
|
+
- <code title="post /v1/webhooks/test">client.webhooks.<a href="./src/gmt/resources/webhooks.py">test</a>(\*\*<a href="src/gmt/types/webhook_test_params.py">params</a>) -> <a href="./src/gmt/types/webhook_test_response.py">WebhookTestResponse</a></code>
|
|
@@ -36,7 +36,7 @@ if TYPE_CHECKING:
|
|
|
36
36
|
from .resources.service import ServiceResource, AsyncServiceResource
|
|
37
37
|
from .resources.accounts import AccountsResource, AsyncAccountsResource
|
|
38
38
|
from .resources.webhooks import WebhooksResource, AsyncWebhooksResource
|
|
39
|
-
from .resources.purchases import PurchasesResource, AsyncPurchasesResource
|
|
39
|
+
from .resources.purchases.purchases import PurchasesResource, AsyncPurchasesResource
|
|
40
40
|
|
|
41
41
|
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Gmt", "AsyncGmt", "Client", "AsyncClient"]
|
|
42
42
|
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..types import profile_change_login_params, profile_change_password_params
|
|
8
|
+
from .._types import Body, Query, Headers, NotGiven, not_given
|
|
9
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
10
|
+
from .._compat import cached_property
|
|
11
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from .._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from .._base_client import make_request_options
|
|
19
|
+
from ..types.profile_retrieve_response import ProfileRetrieveResponse
|
|
20
|
+
from ..types.profile_change_login_response import ProfileChangeLoginResponse
|
|
21
|
+
from ..types.profile_change_password_response import ProfileChangePasswordResponse
|
|
22
|
+
from ..types.profile_unbind_telegram_response import ProfileUnbindTelegramResponse
|
|
23
|
+
|
|
24
|
+
__all__ = ["ProfileResource", "AsyncProfileResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ProfileResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> ProfileResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return ProfileResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> ProfileResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return ProfileResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def retrieve(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
51
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
52
|
+
extra_headers: Headers | None = None,
|
|
53
|
+
extra_query: Query | None = None,
|
|
54
|
+
extra_body: Body | None = None,
|
|
55
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
56
|
+
) -> ProfileRetrieveResponse:
|
|
57
|
+
"""
|
|
58
|
+
Returns detailed user profile information including balances, statistics, and
|
|
59
|
+
program levels.
|
|
60
|
+
"""
|
|
61
|
+
return self._get(
|
|
62
|
+
"/v1/profile/",
|
|
63
|
+
options=make_request_options(
|
|
64
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
65
|
+
),
|
|
66
|
+
cast_to=ProfileRetrieveResponse,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def change_login(
|
|
70
|
+
self,
|
|
71
|
+
*,
|
|
72
|
+
new_login: str,
|
|
73
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
74
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
75
|
+
extra_headers: Headers | None = None,
|
|
76
|
+
extra_query: Query | None = None,
|
|
77
|
+
extra_body: Body | None = None,
|
|
78
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
79
|
+
) -> ProfileChangeLoginResponse:
|
|
80
|
+
"""
|
|
81
|
+
Change the current user login to a new one.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
new_login: User login for registration
|
|
85
|
+
|
|
86
|
+
extra_headers: Send extra headers
|
|
87
|
+
|
|
88
|
+
extra_query: Add additional query parameters to the request
|
|
89
|
+
|
|
90
|
+
extra_body: Add additional JSON properties to the request
|
|
91
|
+
|
|
92
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
|
+
"""
|
|
94
|
+
return self._patch(
|
|
95
|
+
"/v1/profile/change-login",
|
|
96
|
+
body=maybe_transform({"new_login": new_login}, profile_change_login_params.ProfileChangeLoginParams),
|
|
97
|
+
options=make_request_options(
|
|
98
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
99
|
+
),
|
|
100
|
+
cast_to=ProfileChangeLoginResponse,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
def change_password(
|
|
104
|
+
self,
|
|
105
|
+
*,
|
|
106
|
+
new_password: str,
|
|
107
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
108
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
109
|
+
extra_headers: Headers | None = None,
|
|
110
|
+
extra_query: Query | None = None,
|
|
111
|
+
extra_body: Body | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
|
+
) -> ProfileChangePasswordResponse:
|
|
114
|
+
"""
|
|
115
|
+
Change the current user password to a new one.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
new_password: User password. Must contain at least two character types: lowercase, uppercase,
|
|
119
|
+
digits, or special characters
|
|
120
|
+
|
|
121
|
+
extra_headers: Send extra headers
|
|
122
|
+
|
|
123
|
+
extra_query: Add additional query parameters to the request
|
|
124
|
+
|
|
125
|
+
extra_body: Add additional JSON properties to the request
|
|
126
|
+
|
|
127
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
|
+
"""
|
|
129
|
+
return self._patch(
|
|
130
|
+
"/v1/profile/change-password",
|
|
131
|
+
body=maybe_transform(
|
|
132
|
+
{"new_password": new_password}, profile_change_password_params.ProfileChangePasswordParams
|
|
133
|
+
),
|
|
134
|
+
options=make_request_options(
|
|
135
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
136
|
+
),
|
|
137
|
+
cast_to=ProfileChangePasswordResponse,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
def unbind_telegram(
|
|
141
|
+
self,
|
|
142
|
+
*,
|
|
143
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
144
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
145
|
+
extra_headers: Headers | None = None,
|
|
146
|
+
extra_query: Query | None = None,
|
|
147
|
+
extra_body: Body | None = None,
|
|
148
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
149
|
+
) -> ProfileUnbindTelegramResponse:
|
|
150
|
+
"""
|
|
151
|
+
Disables linking of the Telegram account to the user's web profile, all data
|
|
152
|
+
remains on the web account.
|
|
153
|
+
"""
|
|
154
|
+
return self._patch(
|
|
155
|
+
"/v1/profile/unbind-telegram",
|
|
156
|
+
options=make_request_options(
|
|
157
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
158
|
+
),
|
|
159
|
+
cast_to=ProfileUnbindTelegramResponse,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class AsyncProfileResource(AsyncAPIResource):
|
|
164
|
+
@cached_property
|
|
165
|
+
def with_raw_response(self) -> AsyncProfileResourceWithRawResponse:
|
|
166
|
+
"""
|
|
167
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
168
|
+
the raw response object instead of the parsed content.
|
|
169
|
+
|
|
170
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
171
|
+
"""
|
|
172
|
+
return AsyncProfileResourceWithRawResponse(self)
|
|
173
|
+
|
|
174
|
+
@cached_property
|
|
175
|
+
def with_streaming_response(self) -> AsyncProfileResourceWithStreamingResponse:
|
|
176
|
+
"""
|
|
177
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
178
|
+
|
|
179
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
180
|
+
"""
|
|
181
|
+
return AsyncProfileResourceWithStreamingResponse(self)
|
|
182
|
+
|
|
183
|
+
async def retrieve(
|
|
184
|
+
self,
|
|
185
|
+
*,
|
|
186
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
187
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
188
|
+
extra_headers: Headers | None = None,
|
|
189
|
+
extra_query: Query | None = None,
|
|
190
|
+
extra_body: Body | None = None,
|
|
191
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
192
|
+
) -> ProfileRetrieveResponse:
|
|
193
|
+
"""
|
|
194
|
+
Returns detailed user profile information including balances, statistics, and
|
|
195
|
+
program levels.
|
|
196
|
+
"""
|
|
197
|
+
return await self._get(
|
|
198
|
+
"/v1/profile/",
|
|
199
|
+
options=make_request_options(
|
|
200
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
201
|
+
),
|
|
202
|
+
cast_to=ProfileRetrieveResponse,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
async def change_login(
|
|
206
|
+
self,
|
|
207
|
+
*,
|
|
208
|
+
new_login: str,
|
|
209
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
210
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
211
|
+
extra_headers: Headers | None = None,
|
|
212
|
+
extra_query: Query | None = None,
|
|
213
|
+
extra_body: Body | None = None,
|
|
214
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
215
|
+
) -> ProfileChangeLoginResponse:
|
|
216
|
+
"""
|
|
217
|
+
Change the current user login to a new one.
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
new_login: User login for registration
|
|
221
|
+
|
|
222
|
+
extra_headers: Send extra headers
|
|
223
|
+
|
|
224
|
+
extra_query: Add additional query parameters to the request
|
|
225
|
+
|
|
226
|
+
extra_body: Add additional JSON properties to the request
|
|
227
|
+
|
|
228
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
229
|
+
"""
|
|
230
|
+
return await self._patch(
|
|
231
|
+
"/v1/profile/change-login",
|
|
232
|
+
body=await async_maybe_transform(
|
|
233
|
+
{"new_login": new_login}, profile_change_login_params.ProfileChangeLoginParams
|
|
234
|
+
),
|
|
235
|
+
options=make_request_options(
|
|
236
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
237
|
+
),
|
|
238
|
+
cast_to=ProfileChangeLoginResponse,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
async def change_password(
|
|
242
|
+
self,
|
|
243
|
+
*,
|
|
244
|
+
new_password: str,
|
|
245
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
246
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
247
|
+
extra_headers: Headers | None = None,
|
|
248
|
+
extra_query: Query | None = None,
|
|
249
|
+
extra_body: Body | None = None,
|
|
250
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
251
|
+
) -> ProfileChangePasswordResponse:
|
|
252
|
+
"""
|
|
253
|
+
Change the current user password to a new one.
|
|
254
|
+
|
|
255
|
+
Args:
|
|
256
|
+
new_password: User password. Must contain at least two character types: lowercase, uppercase,
|
|
257
|
+
digits, or special characters
|
|
258
|
+
|
|
259
|
+
extra_headers: Send extra headers
|
|
260
|
+
|
|
261
|
+
extra_query: Add additional query parameters to the request
|
|
262
|
+
|
|
263
|
+
extra_body: Add additional JSON properties to the request
|
|
264
|
+
|
|
265
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
266
|
+
"""
|
|
267
|
+
return await self._patch(
|
|
268
|
+
"/v1/profile/change-password",
|
|
269
|
+
body=await async_maybe_transform(
|
|
270
|
+
{"new_password": new_password}, profile_change_password_params.ProfileChangePasswordParams
|
|
271
|
+
),
|
|
272
|
+
options=make_request_options(
|
|
273
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
274
|
+
),
|
|
275
|
+
cast_to=ProfileChangePasswordResponse,
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
async def unbind_telegram(
|
|
279
|
+
self,
|
|
280
|
+
*,
|
|
281
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
282
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
283
|
+
extra_headers: Headers | None = None,
|
|
284
|
+
extra_query: Query | None = None,
|
|
285
|
+
extra_body: Body | None = None,
|
|
286
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
287
|
+
) -> ProfileUnbindTelegramResponse:
|
|
288
|
+
"""
|
|
289
|
+
Disables linking of the Telegram account to the user's web profile, all data
|
|
290
|
+
remains on the web account.
|
|
291
|
+
"""
|
|
292
|
+
return await self._patch(
|
|
293
|
+
"/v1/profile/unbind-telegram",
|
|
294
|
+
options=make_request_options(
|
|
295
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
296
|
+
),
|
|
297
|
+
cast_to=ProfileUnbindTelegramResponse,
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class ProfileResourceWithRawResponse:
|
|
302
|
+
def __init__(self, profile: ProfileResource) -> None:
|
|
303
|
+
self._profile = profile
|
|
304
|
+
|
|
305
|
+
self.retrieve = to_raw_response_wrapper(
|
|
306
|
+
profile.retrieve,
|
|
307
|
+
)
|
|
308
|
+
self.change_login = to_raw_response_wrapper(
|
|
309
|
+
profile.change_login,
|
|
310
|
+
)
|
|
311
|
+
self.change_password = to_raw_response_wrapper(
|
|
312
|
+
profile.change_password,
|
|
313
|
+
)
|
|
314
|
+
self.unbind_telegram = to_raw_response_wrapper(
|
|
315
|
+
profile.unbind_telegram,
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class AsyncProfileResourceWithRawResponse:
|
|
320
|
+
def __init__(self, profile: AsyncProfileResource) -> None:
|
|
321
|
+
self._profile = profile
|
|
322
|
+
|
|
323
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
324
|
+
profile.retrieve,
|
|
325
|
+
)
|
|
326
|
+
self.change_login = async_to_raw_response_wrapper(
|
|
327
|
+
profile.change_login,
|
|
328
|
+
)
|
|
329
|
+
self.change_password = async_to_raw_response_wrapper(
|
|
330
|
+
profile.change_password,
|
|
331
|
+
)
|
|
332
|
+
self.unbind_telegram = async_to_raw_response_wrapper(
|
|
333
|
+
profile.unbind_telegram,
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class ProfileResourceWithStreamingResponse:
|
|
338
|
+
def __init__(self, profile: ProfileResource) -> None:
|
|
339
|
+
self._profile = profile
|
|
340
|
+
|
|
341
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
342
|
+
profile.retrieve,
|
|
343
|
+
)
|
|
344
|
+
self.change_login = to_streamed_response_wrapper(
|
|
345
|
+
profile.change_login,
|
|
346
|
+
)
|
|
347
|
+
self.change_password = to_streamed_response_wrapper(
|
|
348
|
+
profile.change_password,
|
|
349
|
+
)
|
|
350
|
+
self.unbind_telegram = to_streamed_response_wrapper(
|
|
351
|
+
profile.unbind_telegram,
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class AsyncProfileResourceWithStreamingResponse:
|
|
356
|
+
def __init__(self, profile: AsyncProfileResource) -> None:
|
|
357
|
+
self._profile = profile
|
|
358
|
+
|
|
359
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
360
|
+
profile.retrieve,
|
|
361
|
+
)
|
|
362
|
+
self.change_login = async_to_streamed_response_wrapper(
|
|
363
|
+
profile.change_login,
|
|
364
|
+
)
|
|
365
|
+
self.change_password = async_to_streamed_response_wrapper(
|
|
366
|
+
profile.change_password,
|
|
367
|
+
)
|
|
368
|
+
self.unbind_telegram = async_to_streamed_response_wrapper(
|
|
369
|
+
profile.unbind_telegram,
|
|
370
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .bulk import (
|
|
4
|
+
BulkResource,
|
|
5
|
+
AsyncBulkResource,
|
|
6
|
+
BulkResourceWithRawResponse,
|
|
7
|
+
AsyncBulkResourceWithRawResponse,
|
|
8
|
+
BulkResourceWithStreamingResponse,
|
|
9
|
+
AsyncBulkResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .purchases import (
|
|
12
|
+
PurchasesResource,
|
|
13
|
+
AsyncPurchasesResource,
|
|
14
|
+
PurchasesResourceWithRawResponse,
|
|
15
|
+
AsyncPurchasesResourceWithRawResponse,
|
|
16
|
+
PurchasesResourceWithStreamingResponse,
|
|
17
|
+
AsyncPurchasesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"BulkResource",
|
|
22
|
+
"AsyncBulkResource",
|
|
23
|
+
"BulkResourceWithRawResponse",
|
|
24
|
+
"AsyncBulkResourceWithRawResponse",
|
|
25
|
+
"BulkResourceWithStreamingResponse",
|
|
26
|
+
"AsyncBulkResourceWithStreamingResponse",
|
|
27
|
+
"PurchasesResource",
|
|
28
|
+
"AsyncPurchasesResource",
|
|
29
|
+
"PurchasesResourceWithRawResponse",
|
|
30
|
+
"AsyncPurchasesResourceWithRawResponse",
|
|
31
|
+
"PurchasesResourceWithStreamingResponse",
|
|
32
|
+
"AsyncPurchasesResourceWithStreamingResponse",
|
|
33
|
+
]
|