m1guelpf / hyperhost-api
PHP Client for the Hyper.Host API
Fund package maintenance!
m1guelpf
Requires
- php: ^5.5|^7.0
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2024-11-17 04:50:40 UTC
README
This package makes it easy to interact with the Hyper.host API.
Requirements
This package requires PHP >= 5.5.
Installation
You can install the package via composer:
composer require m1guelpf/hyperhost-api
Usage
You must pass a Guzzle client and the API token to the constructor of M1guelpf\HyperHostAPI\HyperHost
.
$hyperhost = new \M1guelpf\HyperHostAPI\HyperHost('YOUR_API_TOKEN');
or you can skip the token and use the connect()
method later
$hyperhost = new \M1guelpf\HyperHostAPI\HyperHost(); $hyperhost->connect('YOUR_FLY_API_TOKEN');
Get all Teams
$hyperhost->getTeams();
Get a specific Team
$hyperhost->getTeam($teamId);
Create a Team
$hyperhost->createTeam($name, $slug);
Invite someone to a Team
$hyperhost->inviteTeamMember($teamId, $email);
Get all Packages
$hyperhost->getPackages();
Get SSO Link
$hyperhost->getSSOLink($packageId);
Create a Package
$hyperhost->createPackage($domain, $platform, $teamId);
Start a Migration
$hyperhost->startMigration($host, $user, $password, $domain);
Get the Guzzle Client
$hyperhost->getClient();
Set the Guzzle Client
$client = new \GuzzleHttp\Client(); // Example Guzzle client $hyperhost->setClient($client);
where $client is an instance of \GuzzleHttp\Client
.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker.
Credits
License
The MIT License. Please see License File for more information.