yoho/aliyun-sdk
Composer 安装命令:
composer require yoho/aliyun-sdk
包简介
SDK for aliyun service develop base on axios
README 文档
README
The set of Aliyun Cloud Service SDK ,Support for composer library.
Env
- PHP 7.0+.
- CURL extension.
Install
composer require axios/aliyun-sdk
Development Plan
- VOD -> Done
- CDN -> Done
- OSS -> Base on aliyun/aliyun-oss-php-sdk
- SMS -> base on flc/dysms
- MTS -> Done
- ECS -> in development
- APIGateway -> in development
- ......
How To Use
- require composer autoload
require_once __DIR__. "/../vendor/autoload.php";
- auth
$access_id = "testAccessKeyId"; $access_secret = "testAccessKeySecret"; \aliyun\sdk\Aliyun::auth($access_id,$access_secret);
- Setting Region
\aliyun\sdk\Aliyun::region('cn-shanghai');
- Request
$response = \aliyun\sdk\vod\Vod::GetCategories() ->setCateId(-1) ->setPageNo(4) ->setPageSize(10) ->request(); // Or Request like this $request = \aliyun\sdk\vod\Vod::GetCategories(); $request->setCateId(-1); $request->setPageNo(4); $request->setPageSize(10) $response = $request->request();
- Get Response Content
dump($response->getContent());
Customized Request
use aliyun\sdk\vod\request\VodCommon; class Example extends VodCommon { public function doSomething(){ //setting Action $this->setActionName("action_name"); //setting parameter $this->setParam("param_name","param_value"); return $this->request(); } }
License
licensed under the Apache License 2.0
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-04-18