AknEvrnky\PerfectPanel\Client is a PHP library for interacting with the PerfectPanel API. The library provides a simple, fluent PHP interface for communicating with PerfectPanel.
The package can be installed via composer:
composer require aknevrnky/perfect-panel
The library provides several methods to interact with the PerfectPanel API.
First, you need to instantiate the PerfectPanel
class with your API URI and API Key:
use AknEvrnky\PerfectPanel\Client\PerfectPanel;
$perfectPanel = new PerfectPanel($apiUri, $apiKey);
$services = $perfectPanel->getServices();
$orderID = $perfectPanel->order($service, $link, $quantity);
$status = $perfectPanel->status($orderID);
$orderIDs = [1, 2, 3];
$statuses = $perfectPanel->statuses($orderIDs);
$otherIds = '3,76,32';
$statuses = $perfectPanel->statuses($otherIds);
$balance = $perfectPanel->balance();
$perfectPanel->refill($orderID);
$perfectPanel->refillStatus($orderID);
The library will throw an ApiErrorException
if the API returns an error.
You should use try-catch blocks to handle these exceptions.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
To run tests:
composer test
AknEvrnky\PerfectPanel\Client is open-sourced software licensed under the MIT license.