secco2112/tinify-php-sdk
最新稳定版本:1.1.1
Composer 安装命令:
composer require secco2112/tinify-php-sdk
包简介
PHP SDK to handle Tinify API requests.
README 文档
README
This is an unofficial PHP SDK for manipulating Tinify API data. Here is an example:
<?php use Secco2112\Tinify\Config; use Secco2112\Tinify\Options; use Secco2112\Tinify\Tinify; $config = new Config([ Options::TINIFYOPT_API_KEY => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]); $tinify = new Tinify; $tinify->setConfig($config); $file_url = 'https://tinypng.com/images/example-orig.png'; $tinify->fromUrl($file_url)->download();
Installation
$ composer require secco2112/tinify-php-sdk
{
"require": {
"secco2112/tinify-php-sdk": "*"
}
}
<?php require 'vendor/autoload.php'; use Secco2112\Tinify\Tinify; $tinify = new Tinify;
Docs
Click on one of the following sections to be redirected to the documentation:
- Getting started
- Shrink from file
- Shrink from URL
- Shrink from binary string
- Handle the data of shrank image
- Download image
- Save image on path
- Extract binary string of shrank image
- Resize methods
- Store in storage services
统计信息
- 总下载量: 441
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-11