PHPackages                             planethoster/planethoster-api - 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. planethoster/planethoster-api

ActiveLibrary[API Development](/categories/api)

planethoster/planethoster-api
=============================

PHP library for PlanetHoster API

1.4.2(2y ago)4751[1 issues](https://github.com/PlanetHoster/planethoster-php/issues)[4 PRs](https://github.com/PlanetHoster/planethoster-php/pulls)MITPHPPHP ^7.3 || ^8.0

Since Mar 14Pushed 2w ago3 watchersCompare

[ Source](https://github.com/PlanetHoster/planethoster-php)[ Packagist](https://packagist.org/packages/planethoster/planethoster-api)[ Docs](https://github.com/PlanetHoster/planethoster-php)[ RSS](/packages/planethoster-planethoster-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

PlanetHoster API Client
=======================

[](#planethoster-api-client)

PHP library for [PlanetHoster API](https://apidoc.planethoster.com/)

[![CircleCI](https://camo.githubusercontent.com/afbca72ccb9d8f5bad7c5ec1dff2984b4356cd1d8e35da043f259c8c9d313c18/68747470733a2f2f646c2e636972636c6563692e636f6d2f7374617475732d62616467652f696d672f67682f506c616e6574486f737465722f706c616e6574686f737465722d7068702f747265652f6d61737465722e7376673f7374796c653d737667)](https://dl.circleci.com/status-badge/redirect/gh/PlanetHoster/planethoster-php/tree/master)[![Latest Stable Version](https://camo.githubusercontent.com/cd811859d8419dc88b1bf006f4ccacd1e071ef3476ab8715a85604ba64376da1/68747470733a2f2f706f7365722e707567782e6f72672f706c616e6574686f737465722f706c616e6574686f737465722d6170692f762f737461626c65)](https://packagist.org/packages/planethoster/planethoster-api)[![Total Downloads](https://camo.githubusercontent.com/a3ece7aa05d7279325993410555c3465f9831106c45e72cde042a24c1cacc8f6/68747470733a2f2f706f7365722e707567782e6f72672f706c616e6574686f737465722f706c616e6574686f737465722d6170692f646f776e6c6f616473)](https://packagist.org/packages/planethoster/planethoster-api)[![License](https://camo.githubusercontent.com/07384d53dd9586d736dbf04df7c577f521514a55a25cb5a0b1577f14ff196ce1/68747470733a2f2f706f7365722e707567782e6f72672f706c616e6574686f737465722f706c616e6574686f737465722d6170692f6c6963656e7365)](https://packagist.org/packages/planethoster/planethoster-api)

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

[](#installation)

We recommend to install this library with [composer](https://getcomposer.org/).

To install composer follow the [official documentation](https://getcomposer.org/doc/00-intro.md). The following command should also work:

```
curl -sS https://getcomposer.org/installer | php
```

To install the library, enter the following command in your PHP project directory:

```
composer require planethoster/planethoster-api
```

Or edit `composer.json` and add:

```
{
    "require": {
        "planethoster/planethoster-api": "^1.0"
    }
}
```

Adapter
-------

[](#adapter)

Inspired by [toin0u/DigitalOceanV2](https://github.com/toin0u/DigitalOceanV2) design, we use `Adapter` interface to make the Http requests.

By default, we provide an adapter for Guzzle with `GuzzleHttpAdapter`.

You can also build your own by implementing the `Adapter` interface.

Example
-------

[](#example)

```
