Skip to content

Commit c389c02

Browse files
committed
chore: sdk update
1 parent 610b589 commit c389c02

File tree

187 files changed

+2408
-183
lines changed

Some content is hidden

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

187 files changed

+2408
-183
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ Class | Method | HTTP request | Description
8484
*DNSSnapshotApi* | [**getSnapshotListV1**](docs/Api/DNSSnapshotApi.md#getsnapshotlistv1) | **GET** /api/dns/v1/snapshots/{domain} | Get snapshot list
8585
*DNSSnapshotApi* | [**getSnapshotV1**](docs/Api/DNSSnapshotApi.md#getsnapshotv1) | **GET** /api/dns/v1/snapshots/{domain}/{snapshotId} | Get snapshot
8686
*DNSSnapshotApi* | [**restoreSnapshotV1**](docs/Api/DNSSnapshotApi.md#restoresnapshotv1) | **POST** /api/dns/v1/snapshots/{domain}/{snapshotId} | Restore snapshot
87+
*DNSZoneApi* | [**deleteZoneRecordsV1**](docs/Api/DNSZoneApi.md#deletezonerecordsv1) | **DELETE** /api/dns/v1/zones/{domain} | Delete zone records
8788
*DNSZoneApi* | [**getRecordsV1**](docs/Api/DNSZoneApi.md#getrecordsv1) | **GET** /api/dns/v1/zones/{domain} | Get records
8889
*DNSZoneApi* | [**resetZoneRecordsV1**](docs/Api/DNSZoneApi.md#resetzonerecordsv1) | **POST** /api/dns/v1/zones/{domain}/reset | Reset zone records
90+
*DNSZoneApi* | [**updateZoneRecordsV1**](docs/Api/DNSZoneApi.md#updatezonerecordsv1) | **PUT** /api/dns/v1/zones/{domain} | Update zone records
91+
*DNSZoneApi* | [**validateZoneRecordsV1**](docs/Api/DNSZoneApi.md#validatezonerecordsv1) | **POST** /api/dns/v1/zones/{domain}/validate | Validate zone records
8992
*DomainsPortfolioApi* | [**getDomainListV1**](docs/Api/DomainsPortfolioApi.md#getdomainlistv1) | **GET** /api/domains/v1/portfolio | Get domain list
9093
*VPSActionsApi* | [**getActionListV1**](docs/Api/VPSActionsApi.md#getactionlistv1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId}/actions | Get action list
9194
*VPSActionsApi* | [**getActionV1**](docs/Api/VPSActionsApi.md#getactionv1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId}/actions/{actionId} | Get action
@@ -159,9 +162,14 @@ Class | Method | HTTP request | Description
159162
- [CommonSuccessEmptyResource](docs/Model/CommonSuccessEmptyResource.md)
160163
- [DNSV1SnapshotSnapshotResource](docs/Model/DNSV1SnapshotSnapshotResource.md)
161164
- [DNSV1SnapshotSnapshotWithContentResource](docs/Model/DNSV1SnapshotSnapshotWithContentResource.md)
165+
- [DNSV1ZoneDestroyRequest](docs/Model/DNSV1ZoneDestroyRequest.md)
166+
- [DNSV1ZoneDestroyRequestFiltersInner](docs/Model/DNSV1ZoneDestroyRequestFiltersInner.md)
162167
- [DNSV1ZoneNameRecordResource](docs/Model/DNSV1ZoneNameRecordResource.md)
163-
- [DNSV1ZoneNameResource](docs/Model/DNSV1ZoneNameResource.md)
168+
- [DNSV1ZoneRecordResource](docs/Model/DNSV1ZoneRecordResource.md)
164169
- [DNSV1ZoneResetRequest](docs/Model/DNSV1ZoneResetRequest.md)
170+
- [DNSV1ZoneUpdateRequest](docs/Model/DNSV1ZoneUpdateRequest.md)
171+
- [DNSV1ZoneUpdateRequestZoneInner](docs/Model/DNSV1ZoneUpdateRequestZoneInner.md)
172+
- [DNSV1ZoneUpdateRequestZoneInnerRecordsInner](docs/Model/DNSV1ZoneUpdateRequestZoneInnerRecordsInner.md)
165173
- [DomainsV1DomainDomainResource](docs/Model/DomainsV1DomainDomainResource.md)
166174
- [VPSGetActionListV1200Response](docs/Model/VPSGetActionListV1200Response.md)
167175
- [VPSGetBackupListV1200Response](docs/Model/VPSGetBackupListV1200Response.md)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hostinger/api-php-sdk",
3-
"version": "0.0.17",
3+
"version": "0.0.18",
44
"description": "Hostinger API PHP SDK",
55
"keywords": [
66
"hostinger",

docs/Api/DNSZoneApi.md

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,65 @@ All URIs are relative to https://developers.hostinger.com, except if the operati
44

55
| Method | HTTP request | Description |
66
| ------------- | ------------- | ------------- |
7+
| [**deleteZoneRecordsV1()**](DNSZoneApi.md#deleteZoneRecordsV1) | **DELETE** /api/dns/v1/zones/{domain} | Delete zone records |
78
| [**getRecordsV1()**](DNSZoneApi.md#getRecordsV1) | **GET** /api/dns/v1/zones/{domain} | Get records |
89
| [**resetZoneRecordsV1()**](DNSZoneApi.md#resetZoneRecordsV1) | **POST** /api/dns/v1/zones/{domain}/reset | Reset zone records |
10+
| [**updateZoneRecordsV1()**](DNSZoneApi.md#updateZoneRecordsV1) | **PUT** /api/dns/v1/zones/{domain} | Update zone records |
11+
| [**validateZoneRecordsV1()**](DNSZoneApi.md#validateZoneRecordsV1) | **POST** /api/dns/v1/zones/{domain}/validate | Validate zone records |
912

1013

14+
## `deleteZoneRecordsV1()`
15+
16+
```php
17+
deleteZoneRecordsV1($domain, $dNSV1ZoneDestroyRequest): \Hostinger\Model\CommonSuccessEmptyResource
18+
```
19+
20+
Delete zone records
21+
22+
This endpoint deletes selected DNS records for the selected domain.
23+
24+
### Example
25+
26+
```php
27+
<?php
28+
require_once(__DIR__ . '/vendor/autoload.php');
29+
30+
31+
// Configure Bearer authorization: apiToken
32+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
33+
34+
35+
$apiInstance = new Hostinger\Api\DNSZoneApi(config: $config);
36+
$domain = mydomain.tld; // string | Domain name
37+
$dNSV1ZoneDestroyRequest = new \Hostinger\Model\DNSV1ZoneDestroyRequest(); // \Hostinger\Model\DNSV1ZoneDestroyRequest
38+
39+
try {
40+
$result = $apiInstance->deleteZoneRecordsV1($domain, $dNSV1ZoneDestroyRequest);
41+
print_r($result);
42+
} catch (Exception $e) {
43+
echo 'Exception when calling DNSZoneApi->deleteZoneRecordsV1: ', $e->getMessage(), PHP_EOL;
44+
}
45+
```
46+
47+
### Parameters
48+
49+
| Name | Type | Description | Notes |
50+
| ------------- | ------------- | ------------- | ------------- |
51+
| **domain** | **string**| Domain name | |
52+
| **dNSV1ZoneDestroyRequest** | [**\Hostinger\Model\DNSV1ZoneDestroyRequest**](../Model/DNSV1ZoneDestroyRequest.md)| | |
53+
54+
### Return type
55+
56+
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
57+
58+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
59+
[[Back to Model list]](../../README.md#models)
60+
[[Back to README]](../../README.md)
61+
1162
## `getRecordsV1()`
1263

1364
```php
14-
getRecordsV1($domain): \Hostinger\Model\DNSV1ZoneNameResource[]
65+
getRecordsV1($domain): \Hostinger\Model\DNSV1ZoneRecordResource[]
1566
```
1667

1768
Get records
@@ -48,7 +99,7 @@ try {
4899

49100
### Return type
50101

51-
[**\Hostinger\Model\DNSV1ZoneNameResource[]**](../Model/DNSV1ZoneNameResource.md)
102+
[**\Hostinger\Model\DNSV1ZoneRecordResource[]**](../Model/DNSV1ZoneRecordResource.md)
52103

53104
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
54105
[[Back to Model list]](../../README.md#models)
@@ -101,3 +152,99 @@ try {
101152
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
102153
[[Back to Model list]](../../README.md#models)
103154
[[Back to README]](../../README.md)
155+
156+
## `updateZoneRecordsV1()`
157+
158+
```php
159+
updateZoneRecordsV1($domain, $dNSV1ZoneUpdateRequest): \Hostinger\Model\CommonSuccessEmptyResource
160+
```
161+
162+
Update zone records
163+
164+
This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
165+
166+
### Example
167+
168+
```php
169+
<?php
170+
require_once(__DIR__ . '/vendor/autoload.php');
171+
172+
173+
// Configure Bearer authorization: apiToken
174+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
175+
176+
177+
$apiInstance = new Hostinger\Api\DNSZoneApi(config: $config);
178+
$domain = mydomain.tld; // string | Domain name
179+
$dNSV1ZoneUpdateRequest = new \Hostinger\Model\DNSV1ZoneUpdateRequest(); // \Hostinger\Model\DNSV1ZoneUpdateRequest
180+
181+
try {
182+
$result = $apiInstance->updateZoneRecordsV1($domain, $dNSV1ZoneUpdateRequest);
183+
print_r($result);
184+
} catch (Exception $e) {
185+
echo 'Exception when calling DNSZoneApi->updateZoneRecordsV1: ', $e->getMessage(), PHP_EOL;
186+
}
187+
```
188+
189+
### Parameters
190+
191+
| Name | Type | Description | Notes |
192+
| ------------- | ------------- | ------------- | ------------- |
193+
| **domain** | **string**| Domain name | |
194+
| **dNSV1ZoneUpdateRequest** | [**\Hostinger\Model\DNSV1ZoneUpdateRequest**](../Model/DNSV1ZoneUpdateRequest.md)| | |
195+
196+
### Return type
197+
198+
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
199+
200+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
201+
[[Back to Model list]](../../README.md#models)
202+
[[Back to README]](../../README.md)
203+
204+
## `validateZoneRecordsV1()`
205+
206+
```php
207+
validateZoneRecordsV1($domain, $dNSV1ZoneUpdateRequest): \Hostinger\Model\CommonSuccessEmptyResource
208+
```
209+
210+
Validate zone records
211+
212+
This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
213+
214+
### Example
215+
216+
```php
217+
<?php
218+
require_once(__DIR__ . '/vendor/autoload.php');
219+
220+
221+
// Configure Bearer authorization: apiToken
222+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
223+
224+
225+
$apiInstance = new Hostinger\Api\DNSZoneApi(config: $config);
226+
$domain = mydomain.tld; // string | Domain name
227+
$dNSV1ZoneUpdateRequest = new \Hostinger\Model\DNSV1ZoneUpdateRequest(); // \Hostinger\Model\DNSV1ZoneUpdateRequest
228+
229+
try {
230+
$result = $apiInstance->validateZoneRecordsV1($domain, $dNSV1ZoneUpdateRequest);
231+
print_r($result);
232+
} catch (Exception $e) {
233+
echo 'Exception when calling DNSZoneApi->validateZoneRecordsV1: ', $e->getMessage(), PHP_EOL;
234+
}
235+
```
236+
237+
### Parameters
238+
239+
| Name | Type | Description | Notes |
240+
| ------------- | ------------- | ------------- | ------------- |
241+
| **domain** | **string**| Domain name | |
242+
| **dNSV1ZoneUpdateRequest** | [**\Hostinger\Model\DNSV1ZoneUpdateRequest**](../Model/DNSV1ZoneUpdateRequest.md)| | |
243+
244+
### Return type
245+
246+
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
247+
248+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
249+
[[Back to Model list]](../../README.md#models)
250+
[[Back to README]](../../README.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# # DNSV1ZoneDestroyRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**filters** | [**\Hostinger\Model\DNSV1ZoneDestroyRequestFiltersInner[]**](DNSV1ZoneDestroyRequestFiltersInner.md) | Filter records for deletion |
8+
9+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # DNSV1ZoneDestroyRequestFiltersInner
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **string** | Name of the record |
8+
**type** | **string** | Type of the record |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/DNSV1ZoneNameRecordResource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**content** | **string** | Content of the name record |
8-
**disabled** | **bool** | Flag to mark name record as disabled | [default to false]
8+
**disabled** | **bool** | Flag to mark name record as disabled |
99

1010
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# # DNSV1ZoneNameResource
1+
# # DNSV1ZoneRecordResource
22

33
## Properties
44

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # DNSV1ZoneUpdateRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**overwrite** | **bool** | If &#x60;true&#x60;, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records&#39; ttl&#39;s are updated and new records are appended. If no matching RRs are found, they are created. | [default to true]
8+
**zone** | [**\Hostinger\Model\DNSV1ZoneUpdateRequestZoneInner[]**](DNSV1ZoneUpdateRequestZoneInner.md) | |
9+
10+
[[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+
# # DNSV1ZoneUpdateRequestZoneInner
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **string** | Name of the record (use &#x60;@&#x60; for wildcard name) |
8+
**records** | [**\Hostinger\Model\DNSV1ZoneUpdateRequestZoneInnerRecordsInner[]**](DNSV1ZoneUpdateRequestZoneInnerRecordsInner.md) | Records assigned to the name |
9+
**ttl** | **int** | TTL (Time-To-Live) of the record |
10+
**type** | **string** | Type of the record |
11+
12+
[[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+
# # DNSV1ZoneUpdateRequestZoneInnerRecordsInner
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**content** | **string** | Content of the name record |
8+
9+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)