chrisarmitage / scaleway-php-api
PHP client for the www.scaleway.com API
dev-master
2016-09-25 11:46 UTC
Requires
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- humbug/humbug: ~1.0.0-alpha2
- mockery/mockery: ^0.9.5
- phpunit/phpunit: ^5.5
- squizlabs/php_codesniffer: ^2.6
This package is not auto-updated.
Last update: 2025-01-18 21:41:40 UTC
README
PHP client for interacting with the Scaleway API (https://developer.scaleway.com/)
WARNING
Not production ready
Current status
- Offers enough functionality to create and poweron VC1S servers.
- No support for volumes yet.
- No tested on other server types yet.
- No validation on parameters (Scaleway docs are a little lightweight).
Roadmap
- Make a Roadmap...
Basic usage
use ChrisArmitage\ScalewayApi as Api; $client = new Api\Client(new GuzzleHttp\Client(), 'https://api.scaleway.com/', 'youracce-ssto-ken0-0000-000000000000'); $gateway = new Api\WebService\Servers\WebServiceGateway($client); $endpoint = new Api\Endpoint\Servers($gateway); $server = $endpoint->createServer('server_name', 'organiza-tion-id00-0000-000000000000', 'imageid0-0000-0000-0000-000000000000', 'VC1S'); $task = $endpoint->setAction($server->getId(), 'poweron');
With Auryn (dependency injection)
use ChrisArmitage\ScalewayApi as Api; $container = new Auryn\Injector(); $container->define( Api\Client::class, [ ':endpoint' => 'https://api.scaleway.com/', ':token' => 'youracce-ssto-ken0-0000-000000000000' ] ); $endpoint = $container->make(Api\Endpoint\Servers::class); $server = $endpoint->createServer('server_name', 'organiza-tion-id00-0000-000000000000', 'imageid0-0000-0000-0000-000000000000', 'VC1S'); $task = $endpoint->setAction($server->getId(), 'poweron');