nfreear/cloudsight-http-client
最新稳定版本:1.0.0-alpha
Composer 安装命令:
composer require nfreear/cloudsight-http-client
包简介
HTTP client for CloudSight's image recognition API. (Not endorsed by CloudSight.)
README 文档
README
cloudsight-http-client
PHP HTTP client library for the CloudSight image recognition API, with mock API functionality.
Installation
Install using Composer, via Packagist. At the commandline / in a terminal, type:
composer require nfreear/cloudsight-http-client:dev-master
Usage
-
Register with CloudSight to get an API key.
-
At the commandline / in a terminal, type:
composer copy-env
- Edit the
CS_API_KEYvariable, in theexample/.envconfiguration file, using your favourite text editor:
atom example/.env
- Try the command line example:
composer example
- And, a web server based example:
composer web
Note: you'll want to set the CS_MOCK variable to false, to run live demos!
Legacy
<?php use Nfreear\Cloudsight\Cloudsight_Http_Client; $client = new CloudSight_Http_Client($api_key); $request = $client->postImageRequests($image_url); while (1) { sleep(1); $result = $client->getImageResponses($request->token); // Check if analysis is complete. if ($client->isComplete()) { break; } } echo "Complete. ALT text: " . $result->name; ?>
NOTE: this library is NOT endorsed by CloudSight.
© 2016 Nick Freear. License: MIT.
统计信息
- 总下载量: 5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-08