aknevrnky/perfect-panel
最新稳定版本:0.1.6
Composer 安装命令:
composer require aknevrnky/perfect-panel
包简介
Perfect panel API SDK
README 文档
README
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.
Installation
The package can be installed via composer:
composer require aknevrnky/perfect-panel
Usage
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);
Get Available Services
$services = $perfectPanel->getServices();
Create an Order
$orderID = $perfectPanel->order($service, $link, $quantity);
Get Order Status
$status = $perfectPanel->status($orderID);
Get Multiple Order Statuses
$orderIDs = [1, 2, 3]; $statuses = $perfectPanel->statuses($orderIDs); $otherIds = '3,76,32'; $statuses = $perfectPanel->statuses($otherIds);
Check Balance
$balance = $perfectPanel->balance();
Refill Order
$perfectPanel->refill($orderID);
Check Refill Status
$perfectPanel->refillStatus($orderID);
Error Handling
The library will throw an ApiErrorException if the API returns an error.
You should use try-catch blocks to handle these exceptions.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Tests
To run tests:
composer test
License
AknEvrnky\PerfectPanel\Client is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-24