Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Configuration Before Usage

Percy Mamedy edited this page Jun 7, 2016 · 2 revisions

Why Configure ?

Before using the package you must first configure it to use one of the service credentials for your Watson Tradeoff Analytics Service API, else you wont be able to communicate with Watson. These credentials will usually be found in your Bluemix Console

All config will be found in config/tradeoff-analytics.php

Default Credentials

This is the default credentials name to use for performing API calls to Tradeoff Analytics, you may change the name and replace it with a more appropriate name for your project.

'default_credentials' => env('TRADEOFF_ANALYTICS_DEFAULT_CREDENTIALS', 'default'),

Credentials

You may define as many credentials as you would like but make sure they are Tradeoff Analytics Credentials and that you specify a name for each one.

'credentials' => [

        'default' => [
            'url'      => env('TRADEOFF_ANALYTICS_URL', 'https://gateway.watsonplatform.net/tradeoff-analytics/api/'),
            'password' => env('TRADEOFF_ANALYTICS_PASSWORD', 'SomePassword'),
            'username' => env('TRADEOFF_ANALYTICS_USERNAME', 'SomeUsername'),
        ],
    ],

Auth method

You may specify the authorization mechanism to ue when making API call to Watson. You can choose between

  • credentials (Will pass username and password to each request for authorization)
  • token (Will request a token using default username and password and use that token on subsequent request to the service)
'auth_method' => 'credentials',

Machine Learning

By default, Watson collects data from all requests and uses the data to improve the service. If you do not want to share your data, set this value to true.

'x_watson_learning_opt_out' => false,
Clone this wiki locally