m1guelpf/hyperhost-api

PHP Client for the Hyper.Host API

dev-master 2018-12-28 14:58 UTC

This package is auto-updated.

Last update: 2024-12-17 05:07:25 UTC


README

Latest Version on Packagist Software License Build Status Total Downloads

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.