eddycjy/aliyun-api-gateway-sdk
Composer 安装命令:
composer require eddycjy/aliyun-api-gateway-sdk
包简介
aliyun-api-gateway-sdk
README 文档
README
Requirements
- PHP >= 5.4.0
- Composer
- Curl
Installation
composer require eddycjy/aliyun-api-gateway-sdk
Configuration
Use File
Copy Env.example.php file to Env.php
return [ 'AccessKeyId' => '', 'AccessKeySecret' => '', 'Format' => 'json', 'Version' => '2016-07-14', 'SignatureMethod' => 'HMAC-SHA1', 'SignatureVersion' => '1.0' ];
Use Array
use ApiGateway\Config\ArrayConfig; use ApiGateway\Model\ApiGroup\CreateApiGroup; use ApiGateway\ApiService; $config = new ArrayConfig([ 'AccessKeyId' => '', 'AccessKeySecret' => '', 'Format' => 'json', 'Version' => '2016-07-14', 'SignatureMethod' => 'HMAC-SHA1', 'SignatureVersion' => '1.0' ]); $model = new CreateApiGroup(); $model->setGroupName('Demo'); $model->setDescription('Demo-CreateApiGroup'); $serviceObj = new ApiService($model, $config); $response = $serviceObj->get();
Usage
Please see the example directory
Gen
Generate Model and Example:
# Python 3.x
python gen.py
Please input class name: CreateApi
Please input class group: Api
Please input class property-key: GroupId
Please input class property-params: id
# input q to quit
Please input class property-key: q
- Model Code:
namespace ApiGateway\Model\Api; use ApiGateway\ApiModel; class CreateApi extends ApiModel { public $GroupId; public function setGroupId($id) { $this->GroupId = $id; return $this; } ...
- Example Code:
use ApiGateway\Model\Api\CreateApi; use ApiGateway\ApiService; $object = new CreateApi(); $object->setGroupId($demo); ... $serviceObj = new ApiService($object); $response = $serviceObj->get();
License
MIT
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-24