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.
It is advised to install it using composer.
composer require merajsiddiqui/ibm-watson
/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:
Authentication:
use IBMWatson\Language\LanguageTranslator\Translator;
//$config as above
$translator = new Translator($config);
Having any trouble mail me at : [email protected] or create an issue. Always use IBM watson API refrence for using this sdk.