fabriceclementz / imagga-php
Imagga API 的简单封装。
v0.1.0
2017-02-16 18:45 UTC
Requires
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- mockery/mockery: ^0.9.8
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2024-09-28 20:09:19 UTC
README
这是对 Imagga API 的简单封装。
安装
通过 composer
composer require fabriceclementz/imagga-php
用法
从图片中提取标签
use GuzzleHttp\Client as HttpClient;
use Fab\Imagga\Client;
$client = new Client(new HttpClient(), 'IMAGGA_API_KEY', 'IMAGGA_API_SECRET');
$response = $client->tags('https://imagga.com/static/images/tagging/wind-farm-538576_640.jpg');
从图片中提取颜色
use GuzzleHttp\Client as HttpClient;
use Fab\Imagga\Client;
$client = new Client(new HttpClient(), 'IMAGGA_API_KEY', 'IMAGGA_API_SECRET');
$response = $client->colors('https://imagga.com/static/images/tagging/wind-farm-538576_640.jpg');
测试
composer test