2017 © Pedro Peláez
 

library upyun-client

upyun api client

image

cdcchen/upyun-client

upyun api client

  • Thursday, April 28, 2016
  • by cdcchen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 194 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 2 % Grown

The README.md

又拍云SDK

安装

composer require cdcchen/upyun-client:^1.0.0

文件操作使用教程

实例化 UpYunClient

use cdcchen\upyun\UpYunClient;

$bucketName = '';
$username = '';
$password = '';
$client = new UpYunClient($bucketName, $username, $password);

上传文件

try {
    $result = $client->writeFile($distFile, $srcFile);
    print_r($result);
} catch (\cdcchen\upyun\ResponseException $e) {
    echo $e->getMessage(), $e->getCode(), PHP_EOL;
} catch (Exception $e) {
    echo $e->getCode(), $e->getMessage(), PHP_EOL;
}

读取文件

$data = $client->readFile($file);

删除文件

$data = $client->deleteFile($file);

获取文件信息

$data = $client->getFileInfo($file);

创建目录

$result = $client->createDir($path, $mkdir = true);

删除目录

$result = $client->deleteDir($path);

读取目录

$data = $client->readDir($path);

获取bucknet存储使用量

$data = $client->getBucketUsage();

Url 作图接口

$delimiter = '!';
$maker = new UrlImageMaker($url, $delimiter);
$maker->fw(200)->scale(2);
$url = $maker->getUrl();

所有url做图接口方法直接使用又拍云官方文档对应的作图参数名称。, (*1)

具体查看:http://docs.upyun.com/cloud/image/#_7, (*2)

The Versions

28/04 2016

dev-master

9999999-dev https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

dev-develop

dev-develop https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.0.0

1.0.0.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.0.1

1.0.1.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.0.2

1.0.2.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.0

1.1.0.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.1

1.1.1.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.2

1.1.2.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.3

1.1.3.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.4

1.1.4.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient

28/04 2016

1.1.5

1.1.5.0 https://github.com/cdcchen/upyun-client

upyun api client

  Sources   Download

BSD-4-Clause

The Requires

 

by Dong Chen

http httpclient upyun phphttp upyunclient