2017 © Pedro Peláez
 

library aliyun-api-gateway-sdk

aliyun-api-gateway-sdk

image

eddycjy/aliyun-api-gateway-sdk

aliyun-api-gateway-sdk

  • Thursday, September 28, 2017
  • by EDDYCJY
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Aliyun Api Gateway SDK

Latest Stable Version License Total Downloads, (*1)

Requirements

  • PHP >= 5.4.0
  • Composer
  • Curl

Installation

``` sh composer require eddycjy/aliyun-api-gateway-sdk, (*2)


# Configuration ## Use File Copy Env.example.php file to Env.php ``` php return [ 'AccessKeyId' => '', 'AccessKeySecret' => '', 'Format' => 'json', 'Version' => '2016-07-14', 'SignatureMethod' => 'HMAC-SHA1', 'SignatureVersion' => '1.0' ];

Use Array

``` php use ApiGateway\Config\ArrayConfig; use ApiGateway\Model\ApiGroup\CreateApiGroup; use ApiGateway\ApiService;, (*3)

$config = new ArrayConfig([ 'AccessKeyId' => '', 'AccessKeySecret' => '', 'Format' => 'json', 'Version' => '2016-07-14', 'SignatureMethod' => 'HMAC-SHA1', 'SignatureVersion' => '1.0' ]);, (*4)

$model = new CreateApiGroup(); $model->setGroupName('Demo'); $model->setDescription('Demo-CreateApiGroup');, (*5)

$serviceObj = new ApiService($model, $config); $response = $serviceObj->get();, (*6)


# Usage [Please see the example directory](https://github.com/EDDYCJY/aliyun-api-gateway-sdk/tree/master/example) # Gen ## Generate Model and Example:

Python 3.x

python gen.py, (*7)


``` sh 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:

``` php namespace ApiGateway\Model\Api;, (*8)

use ApiGateway\ApiModel;, (*9)

class CreateApi extends ApiModel { public $GroupId;, (*10)

public function setGroupId($id)
{
    $this->GroupId = $id;

    return $this;
}

...

- Example Code: ``` php use ApiGateway\Model\Api\CreateApi; use ApiGateway\ApiService; $object = new CreateApi(); $object->setGroupId($demo); ... $serviceObj = new ApiService($object); $response = $serviceObj->get();

License

MIT, (*11)

The Versions

28/09 2017

dev-master

9999999-dev

aliyun-api-gateway-sdk

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Avatar EDDYCJY

api aliyun

28/09 2017

0.9.1

0.9.1.0

aliyun-api-gateway-sdk

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Avatar EDDYCJY

api aliyun

24/09 2017

0.9.0

0.9.0.0

aliyun-api-gateway-sdk

  Sources   Download

MIT

The Development Requires

by Avatar EDDYCJY