fozzyhosting / winvps-php-client
This package is abandoned and no longer maintained.
No replacement package was suggested.
Fozzy Windows VPS APIv2 client library for PHP
v2.1.1
2023-02-10 10:16 UTC
Requires
- php: ^7.2.5 || ^8.0
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- phpstan/phpstan: ^1.4
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
README
This package introduces APIv2 for Windows VPS services using PHP 7.x. PHP8.x version will follow shortly.
It's a complete rewrite of existing winvps-api-php with remaining API request/response format.
Installation
composer require fozzyhosting/winvps-php-client
Usage
<?php use Fozzy\WinVPS\Api\Client; // Create API client $client = Client::make('api-key'); // Returns list of all templates available for new machines $templates = $client->templates()->list(); // View single Job details $jobDetails = $client->jobs()->getById($jobId); // Send single command which does not need additional options $jobs = $client->machines()->sendCommandByName($machineName, 'restart');
The following plugin introduces main VPS entities you can use:
- Brands
- Jobs
- Locations
- Machines
- Products
- Templates
All the classes are fully described in src/v2/Entities/
directory. Description of response objects can be found in src/v2/Schemas/
Testing
Tests are implemented in tests/
directory, and utilize PHPUnit and PHPStan dev dependencies.
./vendor/bin/phpunit
./vendor/bin/phpstan analyse