services/tone_analyzer/v3.js
function(credentials) {
    var taSettings = {};

    username = sUsername || credentials.username;
    password = sPassword || credentials.password;
    apikey = sApikey || credentials.apikey;

    if (apikey) {
      taSettings.iam_apikey = apikey;
    } else if (username && password) {
      taSettings.username = username;
      taSettings.password = password;
    } else {
      taSettings = null;
    }

    return taSettings;
  }
function(credentials) {
    var taSettings = {};

    username = sUsername || credentials.username;
    password = sPassword || credentials.password;
    apikey = sApikey || credentials.apikey;

    if (apikey) {
      taSettings.iam_apikey = apikey;
    } else if (username && password) {
      taSettings.username = username;
      taSettings.password = password;
    } else {
      taSettings = null;
    }

    return taSettings;
  }
function ( credentials ) { var taSettings = { } ; username = sUsername || credentials . username ; password = sPassword || credentials . password ; apikey = sApikey || credentials . apikey ; if ( apikey ) { taSettings . iam_apikey = apikey ; } else if ( username && password ) { taSettings . username = username ; taSettings . password = password ; } else { taSettings = null ; } return taSettings ; }
Check that the credentials have been provided Credentials are needed for each the service.
Check that the credentials have been provided Credentials are needed for each the service .