unikorp/kong-admin-api
Composer 安装命令:
composer require unikorp/kong-admin-api
包简介
Kong Admin Api for PHP Projects
README 文档
README
Installation
Step 1: Download the Library
Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:
$ composer require "unikorp/kong-admin-api"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Download a client implementation
If your project is not already using a client implementation, select one form the list of virtual packages php-http/client-implementation, and then download it.
For this example we are going to use
php-http/guzzle6-adapter
$ composer require "php-http/guzzle6-adapter"
Usage
<?php require_once('./vendor/autoload.php'); // configure KongAdminApi client $configurator = new \Unikorp\KongAdminApi\Configurator(); $configurator->setBaseUri('http://example.com:8001/'); // create KongAdminApi client $client = new \Unikorp\KongAdminApi\Client($configurator); // retrieve node information $response = $client->getNode('information')->retrieveNodeInformation(); $information = json_decode($response->getBody()->getContents(), true); var_dump($information);
统计信息
- 总下载量: 102
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-26