Skip to content

Commit 476fe51

Browse files
chore: sdk update
1 parent 30bf14a commit 476fe51

997 files changed

Lines changed: 2946 additions & 985 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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ Class | Method | HTTP request | Description
228228
*HostingPHPApi* | [**update_php_extensions_v1**](docs/HostingPHPApi.md#update_php_extensions_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions | Update PHP extensions
229229
*HostingPHPApi* | [**update_php_options_v1**](docs/HostingPHPApi.md#update_php_options_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/php/options | Update PHP options
230230
*HostingPHPApi* | [**update_php_version_v1**](docs/HostingPHPApi.md#update_php_version_v1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/php/version | Update PHP version
231+
*HostingRedirectsApi* | [**create_website_redirect_v1**](docs/HostingRedirectsApi.md#create_website_redirect_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Create website redirect
232+
*HostingRedirectsApi* | [**delete_website_redirect_v1**](docs/HostingRedirectsApi.md#delete_website_redirect_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Delete website redirect
233+
*HostingRedirectsApi* | [**list_website_redirects_v1**](docs/HostingRedirectsApi.md#list_website_redirects_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | List website redirects
231234
*HostingWebsitesApi* | [**create_website_v1**](docs/HostingWebsitesApi.md#create_website_v1) | **POST** /api/hosting/v1/websites | Create website
232235
*HostingWebsitesApi* | [**delete_website_v1**](docs/HostingWebsitesApi.md#delete_website_v1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website
233236
*HostingWebsitesApi* | [**list_websites_v1**](docs/HostingWebsitesApi.md#list_websites_v1) | **GET** /api/hosting/v1/websites | List websites
@@ -573,6 +576,7 @@ Class | Method | HTTP request | Description
573576
- [HostingListAccountDatabasesV1200Response](docs/HostingListAccountDatabasesV1200Response.md)
574577
- [HostingListNodeJSBuildsV1200Response](docs/HostingListNodeJSBuildsV1200Response.md)
575578
- [HostingListOrdersV1200Response](docs/HostingListOrdersV1200Response.md)
579+
- [HostingListWebsiteRedirectsV1200Response](docs/HostingListWebsiteRedirectsV1200Response.md)
576580
- [HostingListWebsitesV1200Response](docs/HostingListWebsitesV1200Response.md)
577581
- [HostingV1CacheToggleCacheRequest](docs/HostingV1CacheToggleCacheRequest.md)
578582
- [HostingV1CacheToggleCachelessModeRequest](docs/HostingV1CacheToggleCachelessModeRequest.md)
@@ -616,6 +620,9 @@ Class | Method | HTTP request | Description
616620
- [HostingV1PhpUpdatePhpOptionsRequest](docs/HostingV1PhpUpdatePhpOptionsRequest.md)
617621
- [HostingV1PhpUpdatePhpOptionsRequestOptionsValue](docs/HostingV1PhpUpdatePhpOptionsRequestOptionsValue.md)
618622
- [HostingV1PhpUpdatePhpVersionRequest](docs/HostingV1PhpUpdatePhpVersionRequest.md)
623+
- [HostingV1RedirectsCreateRedirectRequest](docs/HostingV1RedirectsCreateRedirectRequest.md)
624+
- [HostingV1RedirectsDeleteRedirectRequest](docs/HostingV1RedirectsDeleteRedirectRequest.md)
625+
- [HostingV1RedirectsRedirectResource](docs/HostingV1RedirectsRedirectResource.md)
619626
- [HostingV1WebsitesCreateWebsiteRequest](docs/HostingV1WebsitesCreateWebsiteRequest.md)
620627
- [HostingV1WebsitesWebsiteResource](docs/HostingV1WebsitesWebsiteResource.md)
621628
- [InlineObject](docs/InlineObject.md)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HostingListWebsiteRedirectsV1200Response
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**data** | [**List[HostingV1RedirectsRedirectResource]**](HostingV1RedirectsRedirectResource.md) | Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource) | [optional]
9+
**meta** | [**CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | | [optional]
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.hosting_list_website_redirects_v1200_response import HostingListWebsiteRedirectsV1200Response
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of HostingListWebsiteRedirectsV1200Response from a JSON string
19+
hosting_list_website_redirects_v1200_response_instance = HostingListWebsiteRedirectsV1200Response.from_json(json)
20+
# print the JSON string representation of the object
21+
print(HostingListWebsiteRedirectsV1200Response.to_json())
22+
23+
# convert the object into a dict
24+
hosting_list_website_redirects_v1200_response_dict = hosting_list_website_redirects_v1200_response_instance.to_dict()
25+
# create an instance of HostingListWebsiteRedirectsV1200Response from a dict
26+
hosting_list_website_redirects_v1200_response_from_dict = HostingListWebsiteRedirectsV1200Response.from_dict(hosting_list_website_redirects_v1200_response_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+

docs/HostingRedirectsApi.md

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
# hostinger_api.HostingRedirectsApi
2+
3+
All URIs are relative to *https://developers.hostinger.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_website_redirect_v1**](HostingRedirectsApi.md#create_website_redirect_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Create website redirect
8+
[**delete_website_redirect_v1**](HostingRedirectsApi.md#delete_website_redirect_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Delete website redirect
9+
[**list_website_redirects_v1**](HostingRedirectsApi.md#list_website_redirects_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | List website redirects
10+
11+
12+
# **create_website_redirect_v1**
13+
> HostingV1RedirectsRedirectResource create_website_redirect_v1(username, domain, hosting_v1_redirects_create_redirect_request)
14+
15+
Create website redirect
16+
17+
Creates a redirect from a URL on the selected website to another URL or IP address.
18+
19+
### Example
20+
21+
* Bearer Authentication (apiToken):
22+
23+
```python
24+
import hostinger_api
25+
from hostinger_api.models.hosting_v1_redirects_create_redirect_request import HostingV1RedirectsCreateRedirectRequest
26+
from hostinger_api.models.hosting_v1_redirects_redirect_resource import HostingV1RedirectsRedirectResource
27+
from hostinger_api.rest import ApiException
28+
from pprint import pprint
29+
30+
31+
# Configure Bearer authorization: apiToken
32+
configuration = hostinger_api.Configuration(
33+
access_token = os.environ["BEARER_TOKEN"]
34+
)
35+
36+
# Enter a context with an instance of the API client
37+
with hostinger_api.ApiClient(configuration) as api_client:
38+
# Create an instance of the API class
39+
api_instance = hostinger_api.HostingRedirectsApi(api_client)
40+
username = 'u123456789' # str |
41+
domain = 'mydomain.tld' # str | Domain name
42+
hosting_v1_redirects_create_redirect_request = hostinger_api.HostingV1RedirectsCreateRedirectRequest() # HostingV1RedirectsCreateRedirectRequest |
43+
44+
try:
45+
# Create website redirect
46+
api_response = api_instance.create_website_redirect_v1(username, domain, hosting_v1_redirects_create_redirect_request)
47+
print("The response of HostingRedirectsApi->create_website_redirect_v1:\n")
48+
pprint(api_response)
49+
except Exception as e:
50+
print("Exception when calling HostingRedirectsApi->create_website_redirect_v1: %s\n" % e)
51+
```
52+
53+
54+
55+
### Parameters
56+
57+
58+
Name | Type | Description | Notes
59+
------------- | ------------- | ------------- | -------------
60+
**username** | **str**| |
61+
**domain** | **str**| Domain name |
62+
**hosting_v1_redirects_create_redirect_request** | [**HostingV1RedirectsCreateRedirectRequest**](HostingV1RedirectsCreateRedirectRequest.md)| |
63+
64+
### Return type
65+
66+
[**HostingV1RedirectsRedirectResource**](HostingV1RedirectsRedirectResource.md)
67+
68+
### Authorization
69+
70+
[apiToken](../README.md#apiToken)
71+
72+
### HTTP request headers
73+
74+
- **Content-Type**: application/json
75+
- **Accept**: application/json
76+
77+
### HTTP response details
78+
79+
| Status code | Description | Response headers |
80+
|-------------|-------------|------------------|
81+
**200** | Success response | - |
82+
**422** | Validation error response | - |
83+
**401** | Unauthenticated response | - |
84+
**500** | Error response | - |
85+
86+
[[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)
87+
88+
# **delete_website_redirect_v1**
89+
> CommonSuccessEmptyResource delete_website_redirect_v1(username, domain, var_from)
90+
91+
Delete website redirect
92+
93+
Permanently deletes the redirect identified by its source URL.
94+
95+
Pass the `from` value exactly as returned by the list redirects endpoint.
96+
97+
### Example
98+
99+
* Bearer Authentication (apiToken):
100+
101+
```python
102+
import hostinger_api
103+
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
104+
from hostinger_api.rest import ApiException
105+
from pprint import pprint
106+
107+
108+
# Configure Bearer authorization: apiToken
109+
configuration = hostinger_api.Configuration(
110+
access_token = os.environ["BEARER_TOKEN"]
111+
)
112+
113+
# Enter a context with an instance of the API client
114+
with hostinger_api.ApiClient(configuration) as api_client:
115+
# Create an instance of the API class
116+
api_instance = hostinger_api.HostingRedirectsApi(api_client)
117+
username = 'u123456789' # str |
118+
domain = 'mydomain.tld' # str | Domain name
119+
var_from = 'https://example.com/old-page' # str | Source URL returned by the list redirects endpoint.
120+
121+
try:
122+
# Delete website redirect
123+
api_response = api_instance.delete_website_redirect_v1(username, domain, var_from)
124+
print("The response of HostingRedirectsApi->delete_website_redirect_v1:\n")
125+
pprint(api_response)
126+
except Exception as e:
127+
print("Exception when calling HostingRedirectsApi->delete_website_redirect_v1: %s\n" % e)
128+
```
129+
130+
131+
132+
### Parameters
133+
134+
135+
Name | Type | Description | Notes
136+
------------- | ------------- | ------------- | -------------
137+
**username** | **str**| |
138+
**domain** | **str**| Domain name |
139+
**var_from** | **str**| Source URL returned by the list redirects endpoint. |
140+
141+
### Return type
142+
143+
[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md)
144+
145+
### Authorization
146+
147+
[apiToken](../README.md#apiToken)
148+
149+
### HTTP request headers
150+
151+
- **Content-Type**: Not defined
152+
- **Accept**: application/json
153+
154+
### HTTP response details
155+
156+
| Status code | Description | Response headers |
157+
|-------------|-------------|------------------|
158+
**200** | Success empty response | - |
159+
**422** | Validation error response | - |
160+
**401** | Unauthenticated response | - |
161+
**500** | Error response | - |
162+
163+
[[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)
164+
165+
# **list_website_redirects_v1**
166+
> HostingListWebsiteRedirectsV1200Response list_website_redirects_v1(username, domain, page=page, per_page=per_page)
167+
168+
List website redirects
169+
170+
Returns a paginated list of redirects configured for the selected website.
171+
172+
### Example
173+
174+
* Bearer Authentication (apiToken):
175+
176+
```python
177+
import hostinger_api
178+
from hostinger_api.models.hosting_list_website_redirects_v1200_response import HostingListWebsiteRedirectsV1200Response
179+
from hostinger_api.rest import ApiException
180+
from pprint import pprint
181+
182+
183+
# Configure Bearer authorization: apiToken
184+
configuration = hostinger_api.Configuration(
185+
access_token = os.environ["BEARER_TOKEN"]
186+
)
187+
188+
# Enter a context with an instance of the API client
189+
with hostinger_api.ApiClient(configuration) as api_client:
190+
# Create an instance of the API class
191+
api_instance = hostinger_api.HostingRedirectsApi(api_client)
192+
username = 'u123456789' # str |
193+
domain = 'mydomain.tld' # str | Domain name
194+
page = 1 # int | Page number (optional)
195+
per_page = 25 # int | Number of items per page (optional) (default to 25)
196+
197+
try:
198+
# List website redirects
199+
api_response = api_instance.list_website_redirects_v1(username, domain, page=page, per_page=per_page)
200+
print("The response of HostingRedirectsApi->list_website_redirects_v1:\n")
201+
pprint(api_response)
202+
except Exception as e:
203+
print("Exception when calling HostingRedirectsApi->list_website_redirects_v1: %s\n" % e)
204+
```
205+
206+
207+
208+
### Parameters
209+
210+
211+
Name | Type | Description | Notes
212+
------------- | ------------- | ------------- | -------------
213+
**username** | **str**| |
214+
**domain** | **str**| Domain name |
215+
**page** | **int**| Page number | [optional]
216+
**per_page** | **int**| Number of items per page | [optional] [default to 25]
217+
218+
### Return type
219+
220+
[**HostingListWebsiteRedirectsV1200Response**](HostingListWebsiteRedirectsV1200Response.md)
221+
222+
### Authorization
223+
224+
[apiToken](../README.md#apiToken)
225+
226+
### HTTP request headers
227+
228+
- **Content-Type**: Not defined
229+
- **Accept**: application/json
230+
231+
### HTTP response details
232+
233+
| Status code | Description | Response headers |
234+
|-------------|-------------|------------------|
235+
**200** | Success response | - |
236+
**401** | Unauthenticated response | - |
237+
**500** | Error response | - |
238+
239+
[[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)
240+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HostingV1RedirectsCreateRedirectRequest
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**var_from** | **str** | Source URL on the selected website |
9+
**to** | **str** | Destination URL or IP address |
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.hosting_v1_redirects_create_redirect_request import HostingV1RedirectsCreateRedirectRequest
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of HostingV1RedirectsCreateRedirectRequest from a JSON string
19+
hosting_v1_redirects_create_redirect_request_instance = HostingV1RedirectsCreateRedirectRequest.from_json(json)
20+
# print the JSON string representation of the object
21+
print(HostingV1RedirectsCreateRedirectRequest.to_json())
22+
23+
# convert the object into a dict
24+
hosting_v1_redirects_create_redirect_request_dict = hosting_v1_redirects_create_redirect_request_instance.to_dict()
25+
# create an instance of HostingV1RedirectsCreateRedirectRequest from a dict
26+
hosting_v1_redirects_create_redirect_request_from_dict = HostingV1RedirectsCreateRedirectRequest.from_dict(hosting_v1_redirects_create_redirect_request_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+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# HostingV1RedirectsDeleteRedirectRequest
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**var_from** | **str** | Source URL returned by the list redirects endpoint |
9+
10+
## Example
11+
12+
```python
13+
from hostinger_api.models.hosting_v1_redirects_delete_redirect_request import HostingV1RedirectsDeleteRedirectRequest
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of HostingV1RedirectsDeleteRedirectRequest from a JSON string
18+
hosting_v1_redirects_delete_redirect_request_instance = HostingV1RedirectsDeleteRedirectRequest.from_json(json)
19+
# print the JSON string representation of the object
20+
print(HostingV1RedirectsDeleteRedirectRequest.to_json())
21+
22+
# convert the object into a dict
23+
hosting_v1_redirects_delete_redirect_request_dict = hosting_v1_redirects_delete_redirect_request_instance.to_dict()
24+
# create an instance of HostingV1RedirectsDeleteRedirectRequest from a dict
25+
hosting_v1_redirects_delete_redirect_request_from_dict = HostingV1RedirectsDeleteRedirectRequest.from_dict(hosting_v1_redirects_delete_redirect_request_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HostingV1RedirectsRedirectResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**var_from** | **str** | Source URL | [optional]
9+
**to** | **str** | Destination URL | [optional]
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.hosting_v1_redirects_redirect_resource import HostingV1RedirectsRedirectResource
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of HostingV1RedirectsRedirectResource from a JSON string
19+
hosting_v1_redirects_redirect_resource_instance = HostingV1RedirectsRedirectResource.from_json(json)
20+
# print the JSON string representation of the object
21+
print(HostingV1RedirectsRedirectResource.to_json())
22+
23+
# convert the object into a dict
24+
hosting_v1_redirects_redirect_resource_dict = hosting_v1_redirects_redirect_resource_instance.to_dict()
25+
# create an instance of HostingV1RedirectsRedirectResource from a dict
26+
hosting_v1_redirects_redirect_resource_from_dict = HostingV1RedirectsRedirectResource.from_dict(hosting_v1_redirects_redirect_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+

0 commit comments

Comments
 (0)