PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of MERAJ AHMAD SIDDIQUI  >  PHP IBM Watson  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP IBM Watson
Call IBM Watson API services
Author: By
Last change:
Date: 5 months ago
Size: 1,323 bytes
 

Contents

Class file image Download

IBM Watson PHP SDK

IBM Watson is PHP SDK of using IBM watson services provided by IBM. This sdk is unofficial. I personally wish to develop this and i will maintain is as long as possible.

You are free to fork this, use it, and create and issue, I also request you to fork , contribute and create a pull request.

Installation

It is advised to install it using composer.


composer require merajsiddiqui/ibm-watson

Signup IBM watson and get credentials to use API

/config/credential.json

{
  "url": "https://gateway.watsonplatform.net/language-translator/api",
  "username": "some random string password provided",
  "password": "randompassword"
}

Authenticating to Service

<?php

include dirname(__DIR__). "/vendor/autoload.php";
use IBMWatson\Config;
$api_credintial_json_file = "/config/credential.json";
$config = Config::init($api_credintial_json_file);

Using services:

Translator Service

Authentication:


use IBMWatson\Language\LanguageTranslator\Translator;
//$config as above
$translator = new Translator($config);

Support or Contact

Having any trouble mail me at : merajsiddiqui@outlook.com or create an issue. Always use IBM watson API refrence for using this sdk.