<commit_before>/**
 * init.js
 *
 * Copyright (C) 2008 Yahoo! Inc.
 *
 * Sample JavaScript to make FireEagle OAuth requests.
 *
 * See http://fireeagle.yahoo.net/developer/code/javascript
 */

var fe;

function init() {
  var t  = document.getElementById('reqtoken').value;
  var s = document.getElementById('reqstoken').value;
  var c = document.getElementById('usessl').checked;
  fe = new FireEagle(t, s);
  fe.setSSL(c);
  document.getElementById('updates').style.display = "none";
}

function fillBlanks(div, url) {
  var text = "";
  text = "<a href='";
  text += url;
  text += "' target='_blank'>";
  text += url;
  text += "</a>";
  document.getElementById(div).innerHTML = text;
}

function getRequestTok() {
  init();
  var url = fe.getRequestTokenUrl();
  fillBlanks('texty', url);
  return url;
}

function userAuth() {
  init();
  fe.oauthToken = document.getElementById('token').value;
  var url = fe.getAuthorizeUrl();
  fillBlanks('authurl', url);
  return url;
}

function getAccess() {
  init();
  fe.oauthToken = document.getElementById('atoken').value;
  fe.oauthTokenSecret = document.getElementById('astoken').value;
  var url = fe.getAccessUrl();
  fillBlanks('accessurl', url);
  return url;
}

function getRequest(format) {  
  init();
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var url;
  if (format)
    url = fe.getUserUrl(format);
  else
    url = fe.getUserUrl();
  fillBlanks('requests', url);
  return url;
}

function getLookup(format, general) {  
  init();
  var gt = null;
  var gts = null;
  if (general) {
    fe.oauthToken = document.getElementById('gt').value;
    fe.oauthTokenSecret = document.getElementById('gts').value;
  } else {
    fe.oauthToken = document.getElementById('qtoken').value;
    fe.oauthTokenSecret = document.getElementById('qstoken').value;
  }
  var q;
  if (format) 
    q = document.getElementById('lqg').value;
  else
    q = document.getElementById('lq').value;
  var o = new Object(); 
  o.address = q;
  var url;
  if (format)
    url = fe.getLookupUrl(o, format);
  else
    url = fe.getLookupUrl(o);
  if (general)
    fillBlanks('lookupspang', url);
  else 
    fillBlanks('lookupspan', url);
  return url;
}

function getRecent(format) {  
  init();
  var gt = null;
  var gts = null;
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var t = document.getElementById('rTime').value;
  var c = document.getElementById('rCount').value;
  var o = new Object(); 
  o.count = c;
  o.time = t;
  var url;
  if (format)
    url = fe.getRecentUrl(o, format);
  else
    url = fe.getRecentUrl(o);
  fillBlanks('recentspan', url);
  return url;
}

function getWithin(format) {  
  init();
  var gt = null;
  var gts = null;
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var place = document.getElementById('placeid').value;<commit_msg>changed recent param to match new(er) api<commit_after>/**
 * init.js
 *
 * Copyright (C) 2008 Yahoo! Inc.
 *
 * Sample JavaScript to make FireEagle OAuth requests.
 *
 * See http://fireeagle.yahoo.net/developer/code/javascript
 */

var fe;

function init() {
  var t  = document.getElementById('reqtoken').value;
  var s = document.getElementById('reqstoken').value;
  var c = document.getElementById('usessl').checked;
  fe = new FireEagle(t, s);
  fe.setSSL(c);
  document.getElementById('updates').style.display = "none";
}

function fillBlanks(div, url) {
  var text = "";
  text = "<a href='";
  text += url;
  text += "' target='_blank'>";
  text += url;
  text += "</a>";
  document.getElementById(div).innerHTML = text;
}

function getRequestTok() {
  init();
  var url = fe.getRequestTokenUrl();
  fillBlanks('texty', url);
  return url;
}

function userAuth() {
  init();
  fe.oauthToken = document.getElementById('token').value;
  var url = fe.getAuthorizeUrl();
  fillBlanks('authurl', url);
  return url;
}

function getAccess() {
  init();
  fe.oauthToken = document.getElementById('atoken').value;
  fe.oauthTokenSecret = document.getElementById('astoken').value;
  var url = fe.getAccessUrl();
  fillBlanks('accessurl', url);
  return url;
}

function getRequest(format) {  
  init();
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var url;
  if (format)
    url = fe.getUserUrl(format);
  else
    url = fe.getUserUrl();
  fillBlanks('requests', url);
  return url;
}

function getLookup(format, general) {  
  init();
  var gt = null;
  var gts = null;
  if (general) {
    fe.oauthToken = document.getElementById('gt').value;
    fe.oauthTokenSecret = document.getElementById('gts').value;
  } else {
    fe.oauthToken = document.getElementById('qtoken').value;
    fe.oauthTokenSecret = document.getElementById('qstoken').value;
  }
  var q;
  if (format) 
    q = document.getElementById('lqg').value;
  else
    q = document.getElementById('lq').value;
  var o = new Object(); 
  o.address = q;
  var url;
  if (format)
    url = fe.getLookupUrl(o, format);
  else
    url = fe.getLookupUrl(o);
  if (general)
    fillBlanks('lookupspang', url);
  else 
    fillBlanks('lookupspan', url);
  return url;
}

function getRecent(format) {  
  init();
  var gt = null;
  var gts = null;
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var t = document.getElementById('rTime').value;
  var c = document.getElementById('rCount').value;
  var o = new Object(); 
  o.per_page = c;
  o.time = t;
  var url;
  if (format)
    url = fe.getRecentUrl(o, format);
  else
    url = fe.getRecentUrl(o);
  fillBlanks('recentspan', url);
  return url;
}

function getWithin(format) {  
  init();
  var gt = null;
  var gts = null;
  fe.oauthToken = document.getElementById('gt').value;
  fe.oauthTokenSecret = document.getElementById('gts').value;
  var place = document.getElementById('placeid').value;
{'fraction_non_alphanumeric': 0.15653320151590047, 'fraction_numerical': 0.0013181743285549513, 'mean_word_length': 3.8443735035913806, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6562707', 'n_tokens_mistral': 2066, 'n_tokens_neox': 2034, 'n_words': 449}