exploriment/hcloud-php

Hetzner Cloud API 的 PHP 库

v1.1.3 2018-04-23 22:49 UTC

This package is not auto-updated.

Last update: 2024-09-29 04:43:12 UTC


README

License Latest Stable Version Total Downloads

安装:Composer

您可以通过 Composer 安装此库。运行以下命令

composer require exploriment/hcloud-php

文档和示例

完整的技术文档可以在 DOCUMENTATION.md 中找到。更易于阅读的文档可以在 wiki 中找到。

HetznerCloud

<?php
use Exploriment\HetznerCloud;

/**
 * set your API token like this and you are ready to
 * make API calls using this library!
 */
HetznerCloud\HetznerCloud::setToken('my_token_here');

// retrieve the pricing object
$pricing = HetznerCloud\HetznerCloud::getPricing();

/**
 * retrieve the rate limit status, returns the following:
 * 
 * object(stdClass)#1 (3) {
 *    ["limit"]=>
 *    int(0)
 *    ["remaining"]=>
 *    int(0)
 *    ["reset"]=>
 *    int(1517655111)
 *  }
 * 
 * values of these will be `null` if no requests to the API were made
 */
$rateLimit = HetznerCloud\HetznerCloud::getRateLimit();

先决条件和依赖关系

许可协议

MIT