nfreear/cloudsight-http-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Stable Version MIT License Build status: Travis-CI

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

  1. Register with CloudSight to get an API key.

  2. At the commandline / in a terminal, type:

composer copy-env
  1. Edit the CS_API_KEY variable, in the example/.env configuration file, using your favourite text editor:
atom example/.env
  1. Try the command line example:
composer example
  1. 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.

author: @nfreear on Twitter

统计信息

  • 总下载量: 5k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-08