chore: sdk update · hostinger/api-php-sdk@a6c9cf5 · GitHub
Skip to content

Commit a6c9cf5

Browse files
chore: sdk update
1 parent 4d178ef commit a6c9cf5

1,199 files changed

Lines changed: 2205 additions & 1190 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: 4 additions & 0 deletions

‎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": "1.50.0",
3+
"version": "1.50.1",
44
"description": "Hostinger API PHP SDK",
55
"keywords": [
66
"hostinger",

‎docs/Api/HostingGitApi.md‎

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Hostinger\HostingGitApi
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+
| [**listGitInstallationRepositoriesV1()**](HostingGitApi.md#listGitInstallationRepositoriesV1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories |
8+
| [**listGitInstallationsV1()**](HostingGitApi.md#listGitInstallationsV1) | **GET** /api/hosting/v1/git/installations | List Git installations |
9+
10+
11+
## `listGitInstallationRepositoriesV1()`
12+
13+
```php
14+
listGitInstallationRepositoriesV1($uuid): \Hostinger\Model\HostingV1GitGitRepositoryResource[]
15+
```
16+
17+
List Git installation repositories
18+
19+
Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
20+
21+
### Example
22+
23+
```php
24+
<?php
25+
require_once(__DIR__ . '/vendor/autoload.php');
26+
27+
28+
// Configure Bearer authorization: apiToken
29+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
30+
31+
32+
$apiInstance = new Hostinger\Api\HostingGitApi(config: $config);
33+
$uuid = 018f5e2a-1234-7890-abcd-1234567890ab; // string | Git installation UUID from the List Git installations endpoint
34+
35+
try {
36+
$result = $apiInstance->listGitInstallationRepositoriesV1($uuid);
37+
print_r($result);
38+
} catch (Exception $e) {
39+
echo 'Exception when calling HostingGitApi->listGitInstallationRepositoriesV1: ', $e->getMessage(), PHP_EOL;
40+
}
41+
```
42+
43+
### Parameters
44+
45+
| Name | Type | Description | Notes |
46+
| ------------- | ------------- | ------------- | ------------- |
47+
| **uuid** | **string**| Git installation UUID from the List Git installations endpoint | |
48+
49+
### Return type
50+
51+
[**\Hostinger\Model\HostingV1GitGitRepositoryResource[]**](../Model/HostingV1GitGitRepositoryResource.md)
52+
53+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
54+
[[Back to Model list]](../../README.md#models)
55+
[[Back to README]](../../README.md)
56+
57+
## `listGitInstallationsV1()`
58+
59+
```php
60+
listGitInstallationsV1($provider, $status): \Hostinger\Model\HostingV1GitGitInstallationResource[]
61+
```
62+
63+
List Git installations
64+
65+
Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
66+
67+
### Example
68+
69+
```php
70+
<?php
71+
require_once(__DIR__ . '/vendor/autoload.php');
72+
73+
74+
// Configure Bearer authorization: apiToken
75+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
76+
77+
78+
$apiInstance = new Hostinger\Api\HostingGitApi(config: $config);
79+
$provider = github; // string | Filter by Git provider
80+
$status = active; // string | Filter by installation status
81+
82+
try {
83+
$result = $apiInstance->listGitInstallationsV1($provider, $status);
84+
print_r($result);
85+
} catch (Exception $e) {
86+
echo 'Exception when calling HostingGitApi->listGitInstallationsV1: ', $e->getMessage(), PHP_EOL;
87+
}
88+
```
89+
90+
### Parameters
91+
92+
| Name | Type | Description | Notes |
93+
| ------------- | ------------- | ------------- | ------------- |
94+
| **provider** | **string**| Filter by Git provider | [optional] |
95+
| **status** | **string**| Filter by installation status | [optional] [default to &#39;active&#39;] |
96+
97+
### Return type
98+
99+
[**\Hostinger\Model\HostingV1GitGitInstallationResource[]**](../Model/HostingV1GitGitInstallationResource.md)
100+
101+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
102+
[[Back to Model list]](../../README.md#models)
103+
[[Back to README]](../../README.md)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# # HostingV1GitGitInstallationResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**uuid** | **string** | Installation identifier. Use it as the path parameter of List Git installation repositories. |
8+
**provider** | **string** | Git provider the account belongs to |
9+
**accountLogin** | **string** | Login of the connected provider account (user or organization) |
10+
**accountType** | **string** | Whether the connected account is a user or an organization |
11+
**accountAvatarUrl** | **string** | Avatar URL of the connected provider account |
12+
**status** | **string** | Installation status. Only active installations are listed unless the status filter says otherwise. |
13+
**installedAt** | **\DateTime** | When the provider app was installed on the account |
14+
**createdAt** | **\DateTime** | When the installation record was created |
15+
**hasOauth** | **bool** | True when the GitHub user account has a stored OAuth token whose refresh token is still valid, false when the token is missing or its refresh token expired. Null for organization accounts and for providers other than GitHub. |
16+
17+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# # HostingV1GitGitRepositoryResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **int** | Repository identifier assigned by the Git provider |
8+
**name** | **string** | Repository name without the .git suffix |
9+
**fullName** | **string** | Owner and repository name joined with a slash |
10+
**owner** | **string** | Repository owner login |
11+
**isPrivate** | **bool** | Whether the repository is private |
12+
**htmlUrl** | **string** | Repository page URL |
13+
**cloneUrl** | **string** | HTTPS clone URL |
14+
**defaultBranch** | **string** | Default branch of the repository |
15+
16+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

‎src/Api/AgencyHostingCacheApi.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: 1.52.0
8+
* API Version: 1.52.1
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/AgencyHostingCronJobsApi.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: 1.52.0
8+
* API Version: 1.52.1
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/AgencyHostingDatabasesApi.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: 1.52.0
8+
* API Version: 1.52.1
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/AgencyHostingDatacentersApi.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: 1.52.0
8+
* API Version: 1.52.1
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/AgencyHostingDomainsApi.php‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)