Skip to content

Commit 0777739

Browse files
chore: sdk update
1 parent 916c873 commit 0777739

1,357 files changed

Lines changed: 1915 additions & 1364 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ Class | Method | HTTP request | Description
225225
*HostingCDNApi* | [**get_cdn_status_v1**](docs/HostingCDNApi.md#get_cdn_status_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status | Get CDN status
226226
*HostingCDNApi* | [**purge_cdn_cache_v1**](docs/HostingCDNApi.md#purge_cdn_cache_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge | Purge CDN cache
227227
*HostingCacheApi* | [**clear_website_cache_v1**](docs/HostingCacheApi.md#clear_website_cache_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear | Clear website cache
228+
*HostingCacheApi* | [**get_cache_status_v1**](docs/HostingCacheApi.md#get_cache_status_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/status | Get cache status
228229
*HostingCacheApi* | [**toggle_cacheless_mode_v1**](docs/HostingCacheApi.md#toggle_cacheless_mode_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle | Toggle cacheless mode
229230
*HostingCacheApi* | [**toggle_website_cache_v1**](docs/HostingCacheApi.md#toggle_website_cache_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle | Toggle website cache
230231
*HostingCronJobsApi* | [**create_account_cron_job_v1**](docs/HostingCronJobsApi.md#create_account_cron_job_v1) | **POST** /api/hosting/v1/accounts/{username}/cron-jobs | Create account cron job
@@ -754,6 +755,7 @@ Class | Method | HTTP request | Description
754755
- [HostingListOrdersV1200Response](docs/HostingListOrdersV1200Response.md)
755756
- [HostingListWebsiteRedirectsV1200Response](docs/HostingListWebsiteRedirectsV1200Response.md)
756757
- [HostingListWebsitesV1200Response](docs/HostingListWebsitesV1200Response.md)
758+
- [HostingV1CacheCacheStatusResource](docs/HostingV1CacheCacheStatusResource.md)
757759
- [HostingV1CacheToggleCacheRequest](docs/HostingV1CacheToggleCacheRequest.md)
758760
- [HostingV1CacheToggleCachelessModeRequest](docs/HostingV1CacheToggleCachelessModeRequest.md)
759761
- [HostingV1CdnCdnStatusResource](docs/HostingV1CdnCdnStatusResource.md)

‎docs/HostingCacheApi.md‎

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *https://developers.hostinger.com*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**clear_website_cache_v1**](HostingCacheApi.md#clear_website_cache_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear | Clear website cache
8+
[**get_cache_status_v1**](HostingCacheApi.md#get_cache_status_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/status | Get cache status
89
[**toggle_cacheless_mode_v1**](HostingCacheApi.md#toggle_cacheless_mode_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle | Toggle cacheless mode
910
[**toggle_website_cache_v1**](HostingCacheApi.md#toggle_website_cache_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle | Toggle website cache
1011

@@ -88,6 +89,89 @@ Name | Type | Description | Notes
8889

8990
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
9091

92+
# **get_cache_status_v1**
93+
> HostingV1CacheCacheStatusResource get_cache_status_v1(username, domain)
94+
95+
Get cache status
96+
97+
Returns the caching state of the website: whether server-side caching is enabled and whether
98+
development (cacheless) mode is on. Works for the main domain, addon websites, parked domains
99+
and subdomains of the account; each reports its own settings and does not inherit them from
100+
its parent website.
101+
102+
`is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle
103+
immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then
104+
bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background,
105+
so this flag can take a few minutes to follow it.
106+
107+
The domain must be the exact website name as listed on the account, without a `www.` prefix.
108+
Returns 404 when the domain is not a website on the account.
109+
110+
### Example
111+
112+
* Bearer Authentication (apiToken):
113+
114+
```python
115+
import hostinger_api
116+
from hostinger_api.models.hosting_v1_cache_cache_status_resource import HostingV1CacheCacheStatusResource
117+
from hostinger_api.rest import ApiException
118+
from pprint import pprint
119+
120+
121+
# Configure Bearer authorization: apiToken
122+
configuration = hostinger_api.Configuration(
123+
access_token = os.environ["BEARER_TOKEN"]
124+
)
125+
126+
# Enter a context with an instance of the API client
127+
with hostinger_api.ApiClient(configuration) as api_client:
128+
# Create an instance of the API class
129+
api_instance = hostinger_api.HostingCacheApi(api_client)
130+
username = 'u123456789' # str |
131+
domain = 'mydomain.tld' # str | Domain name
132+
133+
try:
134+
# Get cache status
135+
api_response = api_instance.get_cache_status_v1(username, domain)
136+
print("The response of HostingCacheApi->get_cache_status_v1:\n")
137+
pprint(api_response)
138+
except Exception as e:
139+
print("Exception when calling HostingCacheApi->get_cache_status_v1: %s\n" % e)
140+
```
141+
142+
143+
144+
### Parameters
145+
146+
147+
Name | Type | Description | Notes
148+
------------- | ------------- | ------------- | -------------
149+
**username** | **str**| |
150+
**domain** | **str**| Domain name |
151+
152+
### Return type
153+
154+
[**HostingV1CacheCacheStatusResource**](HostingV1CacheCacheStatusResource.md)
155+
156+
### Authorization
157+
158+
[apiToken](../README.md#apiToken)
159+
160+
### HTTP request headers
161+
162+
- **Content-Type**: Not defined
163+
- **Accept**: application/json
164+
165+
### HTTP response details
166+
167+
| Status code | Description | Response headers |
168+
|-------------|-------------|------------------|
169+
**200** | Success response | - |
170+
**401** | Unauthenticated response | - |
171+
**500** | Error response | - |
172+
173+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
174+
91175
# **toggle_cacheless_mode_v1**
92176
> CommonSuccessEmptyResource toggle_cacheless_mode_v1(username, domain, hosting_v1_cache_toggle_cacheless_mode_request)
93177
@@ -98,6 +182,9 @@ is cached, effectively turning off all caching for the website; use it while act
98182
testing changes, debugging issues, or when real-time updates must be visible. Disable it after
99183
finishing development work to restore the performance benefits of caching.
100184

185+
The change is applied in the background and can take a few minutes. Use `Get cache status` to
186+
check the current state.
187+
101188
### Example
102189

103190
* Bearer Authentication (apiToken):
@@ -177,7 +264,8 @@ faster page loads, reduced server load, and improved user experience; recommende
177264
websites. Disabling may impact performance; to temporarily bypass caching while developing or
178265
debugging, prefer toggling cacheless mode instead.
179266

180-
Does nothing if caching is already in the requested state.
267+
Does nothing if caching is already in the requested state. Use `Get cache status` to check the
268+
current state.
181269

182270
### Example
183271

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HostingV1CacheCacheStatusResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**is_enabled** | **bool** | Whether server-side caching is enabled for the website |
9+
**is_cacheless_mode_enabled** | **bool** | Whether development (cacheless) mode is on. While it is on, caching is bypassed even when `is_enabled` is true. Can take a few minutes to follow a cacheless mode toggle. |
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.hosting_v1_cache_cache_status_resource import HostingV1CacheCacheStatusResource
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of HostingV1CacheCacheStatusResource from a JSON string
19+
hosting_v1_cache_cache_status_resource_instance = HostingV1CacheCacheStatusResource.from_json(json)
20+
# print the JSON string representation of the object
21+
print(HostingV1CacheCacheStatusResource.to_json())
22+
23+
# convert the object into a dict
24+
hosting_v1_cache_cache_status_resource_dict = hosting_v1_cache_cache_status_resource_instance.to_dict()
25+
# create an instance of HostingV1CacheCacheStatusResource from a dict
26+
hosting_v1_cache_cache_status_resource_from_dict = HostingV1CacheCacheStatusResource.from_dict(hosting_v1_cache_cache_status_resource_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

‎hostinger_api/__init__.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"""
66
Hostinger API Python SDK
77
8-
API Version: 2.4.2
8+
API Version: 2.4.3
99
1010
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
1111
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
1212
""" # noqa: E501
1313

1414

15-
__version__ = "4.4.2"
15+
__version__ = "4.4.3"
1616

1717
# import apis into sdk package
1818
from hostinger_api.api.agency_hosting_cache_api import AgencyHostingCacheApi
@@ -360,6 +360,7 @@
360360
from hostinger_api.models.hosting_list_orders_v1200_response import HostingListOrdersV1200Response
361361
from hostinger_api.models.hosting_list_website_redirects_v1200_response import HostingListWebsiteRedirectsV1200Response
362362
from hostinger_api.models.hosting_list_websites_v1200_response import HostingListWebsitesV1200Response
363+
from hostinger_api.models.hosting_v1_cache_cache_status_resource import HostingV1CacheCacheStatusResource
363364
from hostinger_api.models.hosting_v1_cache_toggle_cache_request import HostingV1CacheToggleCacheRequest
364365
from hostinger_api.models.hosting_v1_cache_toggle_cacheless_mode_request import HostingV1CacheToggleCachelessModeRequest
365366
from hostinger_api.models.hosting_v1_cdn_cdn_status_resource import HostingV1CdnCdnStatusResource

‎hostinger_api/api/agency_hosting_cache_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_cron_jobs_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_databases_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_datacenters_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_domains_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_files_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 2.4.2
6+
API Version: 2.4.3
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

0 commit comments

Comments
 (0)