Download the PHP package bobbyshaw/ibm-watson-visual-recognition without Composer

On this page you can find all versions of the php package bobbyshaw/ibm-watson-visual-recognition. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ibm-watson-visual-recognition

IBM Watson Visual Recognition API

This PHP library provides integration with the IBM Watson Visual Recognition service.

See API documentation.

Scrutinizer Code Quality Code Coverage Build Status

Usage

The structure of this library was inspired by the Omnipay suite of packages.

One of the things that this means is the library doesn't hide away that fact that API requests are being made. For each API request, the request should be created with parameters passed in, sent and then response reviewed.

All requests are available via the Client.

use Bobbyshaw\WatsonVisualRecognition\Client;
use Bobbyshaw\WatsonVisualRecognition\Classifier;

$client = new Client();

The client should then be initialized with parameters, e.g. username and password (your IBM Watson Service credentials).

$client->initialize(['username' => 'abcdef', 'password' => '12356])

The following can be used find default parameters

$client->getDefaultParameters();

Each method matches an API request and returns a request object ready to be sent. Most of the time you'll want to send the request straight away.

$request = $client->getClassifiers();
$response = $request->send();

Each response has a class which helps to manage the response, e.g with the Classifier and Image classes.

/** @var Classifier[] $classifiers */
$classifiers = $response->getClassifiers();

Commands

The library also comes with a set of commands to use on the command line

Get Classifiers

php app/console classifiers:get [-d|--version-date="..."] username password

Classify Image(s)

php app/console classifiers:classify [-c|--classifiers="..."] [-d|--version-date="..."] username password images

Get Classifier Info

php app/console classifier:get [-d|--version-date="..."] username password classifier_id

Create/Train Classifier

php app/console classifier:create [-d|--version-date="..."] username password positive_examples negative_examples name

Delete Classifier

php app/console classifier:delete [-d|--version-date="..."] username password classifier_id

Testing

Run phpunit tests with:

vendor/bin/phpunit

This is also using grumphp to automatically check for PSR style formatting as well.

Test images are provided by Pixabay.

Documentation

PHPDocumentor is being used for creating library documentation. So make sure to add function comments

vendor/bin/

You may need to install graphViz on your machine if you don't already have it. This can be done on mac with homebrew

brew install graphviz

All versions of ibm-watson-visual-recognition with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
guzzlehttp/guzzle Version 6.1.*
psr/http-message Version 1.0.*
symfony/console Version 2.6.*
symfony/http-foundation Version ~2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bobbyshaw/ibm-watson-visual-recognition contains the following files

Loading the files please wait ....