corbpie/vultr-api-v2
Composer 安装命令:
composer require corbpie/vultr-api-v2
包简介
Easy to use Vultr API V2 PHP class wrapper framework.
README 文档
README
PHP class built for the Vultr API v2. Do all server actions along with Vultr account services like Block storage, backups, DNS, network, snapshots, Custom ISO's, saved ip addresses and much more.
Usage
Install with:
composer require corbpie/vultr-api-v2
Example usage:
<?php require __DIR__ . '/vendor/autoload.php'; use Corbpie\VultrAPIv2\VultrAPI; $vultr = new VultrAPI(); echo $vultr->listServers();//Lists all server instances for account
Current version
2.3 Feb 21 2024
Requires
- PHP 8.2
Vultr API key obtained form your Vultr account menu.
Add your Vultr API key line 8: src/class.php
Examples
List all instances:
$vultr->listServers();
Create a server
$vultr->serverCreateDC(19);//Sydney Australia location $vultr->serverCreatePlan(202);//(2048 MB RAM,55 GB SSD,2.00 TB BW) $vultr->serverCreateType('ISO', 146817);//Deploy with my custom ISO id:146817 $vultr->serverCreateLabel('Created with API');//label instance as "Created with API" echo $vultr->serverCreate();//Creates instance/server with parameters set above (returns subid)
See example.php for more.
TODO
- A proper readme
统计信息
- 总下载量: 214
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-07