<commit_before>//Personify.js
//For more information, visit http://personifyjs.github.io.
//Created by <NAME>, <NAME>, <NAME>
//Copyright 2014 - 2015 <NAME>, <NAME>, <NAME> 
//For use under the MIT license

var Twit = require('twit');
var personifyModule = require('./watson');
var geoLocations = require('../lib/geoLocations');
var translateModule = require('./translate');

var Personify = function(auth) {

  var twitterData = '';

  var T = new Twit({
          consumer_key        :  auth.twitterConfig.consumer_key,
          consumer_secret     :  auth.twitterConfig.consumer_secret,
          access_token        :  auth.twitterConfig.access_token,
          access_token_secret :  auth.twitterConfig.access_token_secret
  });
  
  // create a profile request with the text and the htpps options and call it
  // `req.body.subject` is the subject that was entered by the end user

  // ========= Watson User Modeling and Twitter REST below =============================

  // Takes a twitter handle and return personality traits, needs and values in a JSON object
  Personify.prototype.userPersonify = function(twitterHandle, callback) {

    T.get('statuses/user_timeline', { screen_name: twitterHandle, count: 100 },
        function(err, data, response) {
          if (data.length) {
            for (var i = 0; i < data.length; i++){
              twitterData += data[i].text;
            }
            personifyModule.watson(auth, twitterData, callback);
          } else {
            callback(data, err);
        }
    });
  };
<commit_msg>fix signature of userPersonify method<commit_after>//Personify.js
//For more information, visit http://personifyjs.github.io.
//Created by <NAME>, <NAME>, <NAME>
//Copyright 2014 - 2015 <NAME>, <NAME>, <NAME> 
//For use under the MIT license

var Twit = require('twit');
var personifyModule = require('./watson');
var geoLocations = require('../lib/geoLocations');
var translateModule = require('./translate');

var Personify = function(auth) {

  var twitterData = '';

  var T = new Twit({
          consumer_key        :  auth.twitterConfig.consumer_key,
          consumer_secret     :  auth.twitterConfig.consumer_secret,
          access_token        :  auth.twitterConfig.access_token,
          access_token_secret :  auth.twitterConfig.access_token_secret
  });
  
  // create a profile request with the text and the htpps options and call it
  // `req.body.subject` is the subject that was entered by the end user

  // ========= Watson User Modeling and Twitter REST below =============================

  // Takes a twitter handle and return personality traits, needs and values in a JSON object
  Personify.prototype.userPersonify = function(params, callback) {

    T.get('statuses/user_timeline', params,
        function(err, data, response) {
          if (data.length) {
            for (var i = 0; i < data.length; i++){
              twitterData += data[i].text;
            }
            personifyModule.watson(auth, twitterData, callback);
          } else {
            callback(data, err);
        }
    });
  };

{'fraction_non_alphanumeric': 0.13611380536695764, 'fraction_numerical': 0.006789524733268671, 'mean_word_length': 2.763990267639903, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '756409', 'n_tokens_mistral': 900, 'n_tokens_neox': 841, 'n_words': 255}