eddycjy/aliyun-api-gateway-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eddycjy/aliyun-api-gateway-sdk

Composer 安装命令:

composer require eddycjy/aliyun-api-gateway-sdk

包简介

aliyun-api-gateway-sdk

关键字:

README 文档

README

Latest Stable Version License Total Downloads

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固