2017 © Pedro Peláez
 

library fly-api

PHP Client for the Fly API

image

m1guelpf/fly-api

PHP Client for the Fly API

  • Tuesday, November 28, 2017
  • by m1guelpf
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

PHP Fly.io API Client

Latest Version on Packagist Software License Build Status Total Downloads, (*1)

This package makes it easy to interact with the Fly.io API., (*2)

Requirements

This package requires PHP >= 5.5., (*3)

Installation

You can install the package via composer:, (*4)

``` bash composer require m1guelpf/fly-api, (*5)


## Usage You must pass a Guzzle client and the API token to the constructor of `M1guelpf\FlyAPI\Fly`. ``` php $fly = new \M1guelpf\FlyAPI\Fly('YOUR_FLY_API_TOKEN');

or you can skip the token and use the connect() method later, (*6)

``` php $fly = new \M1guelpf\FlyAPI\Fly();, (*7)

$fly->connect('YOUR_FLY_API_TOKEN');, (*8)


### Get Hostnames ``` php $fly->getHostnames($slug);

Create Hostname

``` php $fly->createHostname($slug, $hostname);, (*9)


### Get Hostname ``` php $fly->getHostname($slug, $hostname);

Create Backend

``` php $fly->createBackend($slug, $name, $type, $settings);, (*10)


### Create Rule ``` php $fly->createRule($slug, $hostname, $backend_id, $action_type, $path, $priority, $path_replacement);

Get the Guzzle Client

``` php $fly->getClient();, (*11)


### Set the Guzzle Client ``` php $client = new \GuzzleHttp\Client(); // Example Guzzle client $fly->setClient($client);

where $client is an instance of \GuzzleHttp\Client., (*12)

Changelog

Please see CHANGELOG for more information what has changed recently., (*13)

Testing

bash $ composer test, (*14)

Contributing

Please see CONTRIBUTING for details., (*15)

Security

If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker., (*16)

Credits

License

The MIT License. Please see License File for more information., (*17)

The Versions

28/11 2017

dev-master

9999999-dev https://github.com/m1guelpf/php-fly-api

PHP Client for the Fly API

  Sources   Download

MIT

The Requires

 

The Development Requires

fly m1guelpf fly-api

28/11 2017

v1.0.2

1.0.2.0 https://github.com/m1guelpf/php-fly-api

PHP Client for the Fly API

  Sources   Download

MIT

The Requires

 

The Development Requires

fly m1guelpf fly-api

28/11 2017

v1.0.1

1.0.1.0 https://github.com/m1guelpf/php-fly-api

PHP Client for the Fly API

  Sources   Download

MIT

The Requires

 

The Development Requires

fly m1guelpf fly-api

22/10 2017

v1.0

1.0.0.0 https://github.com/m1guelpf/php-fly-api

PHP Client for the Fly API

  Sources   Download

MIT

The Requires

 

The Development Requires

fly m1guelpf fly-api