PHPackages                             chrometoaster/sitehost-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. chrometoaster/sitehost-api-client

ActiveLibrary[API Development](/categories/api)

chrometoaster/sitehost-api-client
=================================

PHP client for SiteHost's API

0.2.0(6y ago)1101BSD-3-ClausePHPPHP ^7.3

Since Nov 14Pushed 6y ago5 watchersCompare

[ Source](https://github.com/chrometoasters/sitehost-api-client)[ Packagist](https://packagist.org/packages/chrometoaster/sitehost-api-client)[ Docs](https://github.com/chrometoasters/sitehost-api-client)[ RSS](/packages/chrometoaster-sitehost-api-client/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Simple PHP client for SiteHost's API
====================================

[](#simple-php-client-for-sitehosts-api)

Overview
--------

[](#overview)

This is a work in progress piece of code that may or may not get extended further as/when needed.

API documentation
-----------------

[](#api-documentation)

[SiteHost's API documentation](https://docs.sitehost.nz/api/)

Features
--------

[](#features)

- Get API info
- Get cloud stack info
- Update cloud stack info
- Get API job info

Installation
------------

[](#installation)

`composer install chrometoaster/sitehost-api-client:~0.1`

Example usage
-------------

[](#example-usage)

It is recommended to define the API key and the client ID as environment variables, e.g. through your cloud container environment variables configuration or via your virtual host configuration.

```
use Chrometoaster\SiteHost\API\Client as SiteHostAPIClient;

$env_api_key   = getenv('SITEHOST_API_KEY');
$env_client_id = getenv('SITEHOST_CLIENT_ID');

// create a client
$client = new SiteHostAPIClient($env_api_key, $env_client_id);

// read cloud stack info
$info = $client->getStackInfo('ex-myserver', 'abc123def456ab12');

// check the response is valid and has data
if ($info->isValid()) {
    // work with the information here
    ...
    ...
}
```

TODO
----

[](#todo)

- Implement methods and handling for other API endpoints
- Add tests.

Licence
-------

[](#licence)

BSD-3-Clause, see the [licence](licence.md) for details.

Contributing
------------

[](#contributing)

In general, please be nice to each other. For more details see the [Code of Conduct](code-of-conduct.md).

### Code guidelines

[](#code-guidelines)

This project follows the standards defined in:

- [PSR-1](http://www.php-fig.org/psr/psr-1/)
- [PSR-2](http://www.php-fig.org/psr/psr-2/)
- [RSR-4](http://www.php-fig.org/psr/psr-4/)

Before submitting a PR, please run the script below to lint and update the code according to the standards above.

```
composer run full-check
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Total

5

Last Release

2281d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecb4eb65c3e34dc3384b0fcd0c2efb743ba7716df6b944802c96a50d4e10f550?d=identicon)[michalkleiner](/maintainers/michalkleiner)

---

Top Contributors

[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (8 commits)")

---

Tags

apiclientclient-libraryphpsitehostapiclientsitehostsitehostnz

### Embed Badge

![Health badge](/badges/chrometoaster-sitehost-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/chrometoaster-sitehost-api-client/health.svg)](https://phpackages.com/packages/chrometoaster-sitehost-api-client)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
