bastianleicht / hosterapi-php
A full-featured implementation of the HosterAPI
dev-main
2022-03-28 09:55 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^9.5.0
This package is auto-updated.
Last update: 2024-10-28 15:44:14 UTC
README
This PHP 7.2+ library allows you to communicate with the HosterAPI.
You can find the full API documentation here!
Getting Started
Recommended installation is using Composer!
In the root of your project execute the following:
$ composer require bastianleicht/hosterapi-php
Or add this to your composer.json
file:
{ "require": { "bastianleicht/hosterapi-php": "^1.0" } }
Then perform the installation:
$ composer install --no-dev
Examples
Creating the HosterAPI main object:
<?php // Require the autoloader require_once 'vendor/autoload.php'; // Use the library namespace use HosterAPI\HosterAPI; // Then simply pass your API-Token when creating the API client object. $client = new HosterAPI('API-Token'); // Then you are able to perform a request var_dump($client->virtualServer()->list()); ?>
If you want more info on how to use this PHP-API you should check out the Wiki.