This package makes it easy to interact with the Fly.io API.
This package requires PHP >= 5.5.
You can install the package via composer:
composer require m1guelpf/fly-api
You must pass a Guzzle client and the API token to the constructor of M1guelpf\FlyAPI\Fly
.
$fly = new \M1guelpf\FlyAPI\Fly('YOUR_FLY_API_TOKEN');
or you can skip the token and use the connect()
method later
$fly = new \M1guelpf\FlyAPI\Fly();
$fly->connect('YOUR_FLY_API_TOKEN');
$fly->getHostnames($slug);
$fly->createHostname($slug, $hostname);
$fly->getHostname($slug, $hostname);
$fly->createBackend($slug, $name, $type, $settings);
$fly->createRule($slug, $hostname, $backend_id, $action_type, $path, $priority, $path_replacement);
$fly->getClient();
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$fly->setClient($client);
where $client is an instance of \GuzzleHttp\Client
.
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License. Please see License File for more information.