bumbal/rancher-php-client
最新稳定版本:1.1.5
Composer 安装命令:
composer require bumbal/rancher-php-client
包简介
A PHP Client for Rancher
README 文档
README
A PHP client for Rancher
This client is largely based on the structure and code used by Swagger PHP. All files are generated from the schema files found within Rancher. Checkout the generator folder for more information.
Disclaimer: I am not in any way, shape or form associated with Rancher.
Version mapping
1.0.* → Rancher v2.3.2
1.1.* → Rancher v2.5.7
Requirements
PHP 7.2.0 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:
{
"require": {
"bumbal/rancher-php-client": "^1.0"
}
}
Then run composer install
or
composer require bumbal/rancher-php-client
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); try { $rancherClient = new Rancher\RancherClient("https://your.racher.url/", "rancher_token", "rancher_secret"); $namespaceResource = new \Rancher\Resource\NamespaceResource($rancherClient, "c-abcdef"); $namespaceModel = new \Rancher\Model\NamespaceModel(); $namespaceModel->setName('from-php-api'); $namespaceModel->setDescription('Namespace generated with Rancher PHP Client'); $namespaceModel->setProjectId('c-abcdef:p-qwerty'); print_r($namespaceResource->create($namespaceModel)); } catch (\Rancher\RancherException $e) { echo $e->getMessage(); } ?>
统计信息
- 总下载量: 2.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-29