Skip to content

Repository files navigation

PlanetHoster API Client

PHP library for PlanetHoster API

CircleCILatest Stable VersionTotal DownloadsLicense

Installation

We recommend to install this library with composer.

To install composer follow the official documentation. 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

Inspired by 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

<?phprequire__DIR__ . '/vendor/autoload.php';
usePlanetHoster\Adapter\GuzzleHttpAdapter;
usePlanetHoster\PlanetHoster;
// create an adapter with api_user and api_key$adapter = newGuzzleHttpAdapter('your_api_user', 'your_api_key');
// create a PlanetHoster object$planethoster = newPlanetHoster($adapter);
// Get your PlanetHoster account information$infos = $planethoster->account()->Info();
// ...

Credits

Support

Please open an issue in github

Resources

PlanetHoster API documentation

About

PHP library for PlanetHoster API

Topics

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages