Skip to content

Commit a09adbd

Browse files
chore: sdk update
1 parent 820816a commit a09adbd

417 files changed

Lines changed: 1343 additions & 404 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
@@ -106,6 +106,10 @@ Class | Method | HTTP request | Description
106106
*EcommerceStoresApi* | [**getStoresV1**](docs/Api/EcommerceStoresApi.md#getstoresv1) | **GET** /api/ecommerce/v1/stores | Get stores
107107
*HorizonsWebsitesApi* | [**createWebsiteV1**](docs/Api/HorizonsWebsitesApi.md#createwebsitev1) | **POST** /api/horizons/v1/websites | Create website
108108
*HorizonsWebsitesApi* | [**getWebsiteV1**](docs/Api/HorizonsWebsitesApi.md#getwebsitev1) | **GET** /api/horizons/v1/websites/{websiteId} | Get website
109+
*HostingCronJobsApi* | [**createAccountCronJobV1**](docs/Api/HostingCronJobsApi.md#createaccountcronjobv1) | **POST** /api/hosting/v1/accounts/{username}/cron-jobs | Create account cron job
110+
*HostingCronJobsApi* | [**deleteAccountCronJobV1**](docs/Api/HostingCronJobsApi.md#deleteaccountcronjobv1) | **DELETE** /api/hosting/v1/accounts/{username}/cron-jobs/{uid} | Delete account cron job
111+
*HostingCronJobsApi* | [**getCronJobOutputV1**](docs/Api/HostingCronJobsApi.md#getcronjoboutputv1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs/{uid}/output | Get cron job output
112+
*HostingCronJobsApi* | [**listAccountCronJobsV1**](docs/Api/HostingCronJobsApi.md#listaccountcronjobsv1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs | List account cron jobs
109113
*HostingDatabasesApi* | [**changeDatabasePasswordV1**](docs/Api/HostingDatabasesApi.md#changedatabasepasswordv1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/change-password | Change database password
110114
*HostingDatabasesApi* | [**createAccountDatabaseRemoteConnectionV1**](docs/Api/HostingDatabasesApi.md#createaccountdatabaseremoteconnectionv1) | **POST** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Create account database remote connection
111115
*HostingDatabasesApi* | [**createAccountDatabaseV1**](docs/Api/HostingDatabasesApi.md#createaccountdatabasev1) | **POST** /api/hosting/v1/accounts/{username}/databases | Create account database
@@ -277,6 +281,9 @@ Class | Method | HTTP request | Description
277281
- [HostingListNodeJSBuildsV1200Response](docs/Model/HostingListNodeJSBuildsV1200Response.md)
278282
- [HostingListOrdersV1200Response](docs/Model/HostingListOrdersV1200Response.md)
279283
- [HostingListWebsitesV1200Response](docs/Model/HostingListWebsitesV1200Response.md)
284+
- [HostingV1CronJobsCreateCronJobRequest](docs/Model/HostingV1CronJobsCreateCronJobRequest.md)
285+
- [HostingV1CronJobsCronJobOutputResource](docs/Model/HostingV1CronJobsCronJobOutputResource.md)
286+
- [HostingV1CronJobsCronJobResource](docs/Model/HostingV1CronJobsCronJobResource.md)
280287
- [HostingV1DatabasesChangeDatabasePasswordRequest](docs/Model/HostingV1DatabasesChangeDatabasePasswordRequest.md)
281288
- [HostingV1DatabasesCreateDatabaseRequest](docs/Model/HostingV1DatabasesCreateDatabaseRequest.md)
282289
- [HostingV1DatabasesDatabaseResource](docs/Model/HostingV1DatabasesDatabaseResource.md)

docs/Api/HostingCronJobsApi.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# Hostinger\HostingCronJobsApi
2+
3+
All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
4+
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**createAccountCronJobV1()**](HostingCronJobsApi.md#createAccountCronJobV1) | **POST** /api/hosting/v1/accounts/{username}/cron-jobs | Create account cron job |
8+
| [**deleteAccountCronJobV1()**](HostingCronJobsApi.md#deleteAccountCronJobV1) | **DELETE** /api/hosting/v1/accounts/{username}/cron-jobs/{uid} | Delete account cron job |
9+
| [**getCronJobOutputV1()**](HostingCronJobsApi.md#getCronJobOutputV1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs/{uid}/output | Get cron job output |
10+
| [**listAccountCronJobsV1()**](HostingCronJobsApi.md#listAccountCronJobsV1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs | List account cron jobs |
11+
12+
13+
## `createAccountCronJobV1()`
14+
15+
```php
16+
createAccountCronJobV1($username, $hostingV1CronJobsCreateCronJobRequest): \Hostinger\Model\HostingV1CronJobsCronJobResource
17+
```
18+
19+
Create account cron job
20+
21+
Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
22+
23+
### Example
24+
25+
```php
26+
<?php
27+
require_once(__DIR__ . '/vendor/autoload.php');
28+
29+
30+
// Configure Bearer authorization: apiToken
31+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
32+
33+
34+
$apiInstance = new Hostinger\Api\HostingCronJobsApi(config: $config);
35+
$username = u123456789; // string
36+
$hostingV1CronJobsCreateCronJobRequest = new \Hostinger\Model\HostingV1CronJobsCreateCronJobRequest(); // \Hostinger\Model\HostingV1CronJobsCreateCronJobRequest
37+
38+
try {
39+
$result = $apiInstance->createAccountCronJobV1($username, $hostingV1CronJobsCreateCronJobRequest);
40+
print_r($result);
41+
} catch (Exception $e) {
42+
echo 'Exception when calling HostingCronJobsApi->createAccountCronJobV1: ', $e->getMessage(), PHP_EOL;
43+
}
44+
```
45+
46+
### Parameters
47+
48+
| Name | Type | Description | Notes |
49+
| ------------- | ------------- | ------------- | ------------- |
50+
| **username** | **string**| | |
51+
| **hostingV1CronJobsCreateCronJobRequest** | [**\Hostinger\Model\HostingV1CronJobsCreateCronJobRequest**](../Model/HostingV1CronJobsCreateCronJobRequest.md)| | |
52+
53+
### Return type
54+
55+
[**\Hostinger\Model\HostingV1CronJobsCronJobResource**](../Model/HostingV1CronJobsCronJobResource.md)
56+
57+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
58+
[[Back to Model list]](../../README.md#models)
59+
[[Back to README]](../../README.md)
60+
61+
## `deleteAccountCronJobV1()`
62+
63+
```php
64+
deleteAccountCronJobV1($username, $uid): \Hostinger\Model\CommonSuccessEmptyResource
65+
```
66+
67+
Delete account cron job
68+
69+
Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
70+
71+
### Example
72+
73+
```php
74+
<?php
75+
require_once(__DIR__ . '/vendor/autoload.php');
76+
77+
78+
// Configure Bearer authorization: apiToken
79+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
80+
81+
82+
$apiInstance = new Hostinger\Api\HostingCronJobsApi(config: $config);
83+
$username = u123456789; // string
84+
$uid = cron_abc123; // string | Unique identifier of the cron job as returned by the list cron jobs endpoint.
85+
86+
try {
87+
$result = $apiInstance->deleteAccountCronJobV1($username, $uid);
88+
print_r($result);
89+
} catch (Exception $e) {
90+
echo 'Exception when calling HostingCronJobsApi->deleteAccountCronJobV1: ', $e->getMessage(), PHP_EOL;
91+
}
92+
```
93+
94+
### Parameters
95+
96+
| Name | Type | Description | Notes |
97+
| ------------- | ------------- | ------------- | ------------- |
98+
| **username** | **string**| | |
99+
| **uid** | **string**| Unique identifier of the cron job as returned by the list cron jobs endpoint. | |
100+
101+
### Return type
102+
103+
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
104+
105+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
106+
[[Back to Model list]](../../README.md#models)
107+
[[Back to README]](../../README.md)
108+
109+
## `getCronJobOutputV1()`
110+
111+
```php
112+
getCronJobOutputV1($username, $uid): \Hostinger\Model\HostingV1CronJobsCronJobOutputResource
113+
```
114+
115+
Get cron job output
116+
117+
Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
118+
119+
### Example
120+
121+
```php
122+
<?php
123+
require_once(__DIR__ . '/vendor/autoload.php');
124+
125+
126+
// Configure Bearer authorization: apiToken
127+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
128+
129+
130+
$apiInstance = new Hostinger\Api\HostingCronJobsApi(config: $config);
131+
$username = u123456789; // string
132+
$uid = cron_abc123; // string | Unique identifier of the cron job as returned by the list cron jobs endpoint.
133+
134+
try {
135+
$result = $apiInstance->getCronJobOutputV1($username, $uid);
136+
print_r($result);
137+
} catch (Exception $e) {
138+
echo 'Exception when calling HostingCronJobsApi->getCronJobOutputV1: ', $e->getMessage(), PHP_EOL;
139+
}
140+
```
141+
142+
### Parameters
143+
144+
| Name | Type | Description | Notes |
145+
| ------------- | ------------- | ------------- | ------------- |
146+
| **username** | **string**| | |
147+
| **uid** | **string**| Unique identifier of the cron job as returned by the list cron jobs endpoint. | |
148+
149+
### Return type
150+
151+
[**\Hostinger\Model\HostingV1CronJobsCronJobOutputResource**](../Model/HostingV1CronJobsCronJobOutputResource.md)
152+
153+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
154+
[[Back to Model list]](../../README.md#models)
155+
[[Back to README]](../../README.md)
156+
157+
## `listAccountCronJobsV1()`
158+
159+
```php
160+
listAccountCronJobsV1($username): \Hostinger\Model\HostingV1CronJobsCronJobResource[]
161+
```
162+
163+
List account cron jobs
164+
165+
Returns the list of cron jobs configured for the specified account, including their schedule and command.
166+
167+
### Example
168+
169+
```php
170+
<?php
171+
require_once(__DIR__ . '/vendor/autoload.php');
172+
173+
174+
// Configure Bearer authorization: apiToken
175+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
176+
177+
178+
$apiInstance = new Hostinger\Api\HostingCronJobsApi(config: $config);
179+
$username = u123456789; // string
180+
181+
try {
182+
$result = $apiInstance->listAccountCronJobsV1($username);
183+
print_r($result);
184+
} catch (Exception $e) {
185+
echo 'Exception when calling HostingCronJobsApi->listAccountCronJobsV1: ', $e->getMessage(), PHP_EOL;
186+
}
187+
```
188+
189+
### Parameters
190+
191+
| Name | Type | Description | Notes |
192+
| ------------- | ------------- | ------------- | ------------- |
193+
| **username** | **string**| | |
194+
195+
### Return type
196+
197+
[**\Hostinger\Model\HostingV1CronJobsCronJobResource[]**](../Model/HostingV1CronJobsCronJobResource.md)
198+
199+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
200+
[[Back to Model list]](../../README.md#models)
201+
[[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # HostingV1CronJobsCreateCronJobRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**time** | **string** | Cron schedule expression (for example \&quot;0 2 * * *\&quot; runs daily at 02:00). |
8+
**command** | **string** | Command to execute on the schedule. |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# # HostingV1CronJobsCronJobOutputResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**output** | **string** | Output captured from the last cron job execution. Empty when the cron job has not run yet. |
8+
9+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# # HostingV1CronJobsCronJobResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**uid** | **string** | Unique identifier of the cron job. Use it to delete the cron job or fetch its output. |
8+
**username** | **string** | Username of the account that owns the cron job. |
9+
**time** | **string** | Cron schedule expression. |
10+
**command** | **string** | Command executed on the schedule. |
11+
12+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

src/Api/BillingCatalogApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Hostinger API PHP SDK
77
*
8-
* API Version: 0.20.0
8+
* API Version: 0.21.0
99
* @url https://github.com/hostinger/api-php-sdk
1010
*
1111
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!

src/Api/BillingPaymentMethodsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Hostinger API PHP SDK
77
*
8-
* API Version: 0.20.0
8+
* API Version: 0.21.0
99
* @url https://github.com/hostinger/api-php-sdk
1010
*
1111
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!

src/Api/BillingSubscriptionsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Hostinger API PHP SDK
77
*
8-
* API Version: 0.20.0
8+
* API Version: 0.21.0
99
* @url https://github.com/hostinger/api-php-sdk
1010
*
1111
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!

src/Api/DNSSnapshotApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Hostinger API PHP SDK
77
*
8-
* API Version: 0.20.0
8+
* API Version: 0.21.0
99
* @url https://github.com/hostinger/api-php-sdk
1010
*
1111
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!

src/Api/DNSZoneApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Hostinger API PHP SDK
77
*
8-
* API Version: 0.20.0
8+
* API Version: 0.21.0
99
* @url https://github.com/hostinger/api-php-sdk
1010
*
1111
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!

0 commit comments

Comments
 (0)