iotamine/sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iotamine/sdk

Composer 安装命令:

composer require iotamine/sdk

包简介

Official PHP SDK for Iotamine Cloud API

README 文档

README

The Iotamine PHP SDK allows developers to easily interact with the Iotamine Cloud API.
Create, manage, and automate your Virtual Machines (VPS) and cloud infrastructure using PHP.

🚀 Features

  • 🔐 Authenticate using API Key
  • 💻 Create and manage VPS instances
  • 🔁 Start, stop, restart, power off, or rebuild VMs
  • 🧱 List available OS templates and POP (regions)
  • 📦 Fully Composer-compatible and PSR-4 autoloaded

📦 Installation

composer require iotamine/sdk

If not published yet, clone the repo and add to your project's composer.json manually using "repositories" and "path" keys.

🛠 Usage

Initialize Client

require 'vendor/autoload.php';

use Iotamine\IotamineClient;
use Iotamine\VM;
use Iotamine\Core;

$client = new IotamineClient("your-api-key");
$vm = new VM($client);
$core = new Core($client);

🔧 Examples

List OS & POPs

$osList = $core->listOS();
$popList = $core->listPOP();
print_r($osList);
print_r($popList);

Create a VM

$response = $vm->create(
    "my-server",
    "StrongPass@123",
    $osList[0]['id'],
    $popList[0]['id'],
    2,      // CPU cores
    4,   // RAM in GB
    80      // Disk in GB
);
print_r($response);

Start/Stop VM

$vm->start($vpsId);
$vm->stop($vpsId);

Destroy VM

$vm->destroy($vpsId);

📂 Folder Structure

iotamine-php-sdk/
├── src/
│   ├── IotamineClient.php  # Core HTTP client
│   ├── VM.php              # VPS operations
│   └── Core.php            # List OS / POP
├── composer.json
├── README.md

✅ Requirements

🔒 Authentication

All API requests require a valid API Key which can be generated from the Iotamine Control Panel.

The key is passed using the header: Authorization: Api-Key <your-key>

🧪 Development

Clone this repository:

composer install

🪪 License

This SDK is licensed under the MIT License.

🌐 Resources

🤝 Contributing

Pull requests and issue reports are welcome. Feel free to fork the repo and submit a PR.

🙋 Need Help?

If you have any questions or want to suggest improvements, feel free to reach out via corporate@iotamine.com.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-28