idcf/client

v0.0.2 2018-02-04 21:44 UTC

This package is not auto-updated.

Last update: 2024-09-20 08:10:41 UTC


README

PHP客户端,用于IDCF Cloud

安装

执行

$ composer require idcf/client

依赖项

  • PHP 5.4或更高版本

使用

计算

<?php
require_once 'vendor/autoload.php';
$api_key = '';
$secret_key = '';
$client = new \Idcf\Client\Compute($api_key, $secret_key, 'compute.jp-east.idcfcloud.com');
$args = array('command' => 'listZones');
$client->get($args);

无限负载均衡

<?php
require_once 'vendor/autoload.php';
$api_key = '';
$secret_key = '';
$client = new \Idcf\Client\Ilb($api_key, $secret_key, 'ilb.jp-east.idcfcloud.com');
$client->get('loadbalancers');

域名系统

<?php
require_once 'vendor/autoload.php';
$api_key = '';
$secret_key = '';
$client = new \Idcf\Client\Dns($api_key, $secret_key);
$client->get('zones');

计费

<?php
require_once 'vendor/autoload.php';
$api_key = '';
$secret_key = '';
$client = new \Idcf\Client\Your($api_key, $secret_key);
$client->get('billings/history');

内容缓存

<?php
require_once 'vendor/autoload.php';
$api_key = '';
$secret_key = '';
$client = new \Idcf\Client\CdnZero($api_key, $secret_key);
$args = array('api_key' => $api_key);
$client->get('fqdns', $args);

贡献

欢迎在GitHub上提交https://github.com/nhashiguchi/idcf-client-php的bug报告和pull请求。本项目旨在成为安全的、友好的协作空间,贡献者应遵守贡献者公约行为准则。

许可证

此库作为开源项目,根据MIT许可证条款提供。