Skip to content
Permalink
Browse files

Added additional download logic

  • Loading branch information...
Asimov4 committed Sep 28, 2014
1 parent f4dbc47 commit 514d202743c8501b1a7c72174860f091a595cbb4
Showing with 24 additions and 13 deletions.
  1. +24 −13 static/importing/index.html
@@ -130,7 +130,8 @@ <h4 class="company">' + company.name + '</h4> \
IN.API.PeopleSearch()
.fields("id", "last-modified-timestamp", "location","firstName", "lastName", "headline", "industry", "positions", "picture-url", "summary", "associations", "languages", "publications", "skills", "certifications", "educations", "courses", "volunteer", "three-current-positions", "three-past-positions", "recommendations-received", "following", "date-of-birth", "honors-awards")
.params({
"keywords": document.searchform.dream.value,
"company-name": document.searchform.dream.value,
"current-company": true,
"count": 25,
"start": start
})
@@ -145,13 +146,30 @@ <h4 class="company">' + company.name + '</h4> \
return;
}
performPeopleSearchCall(0);
performPeopleSearchCall(25);
performPeopleSearchCall(50);
performPeopleSearchCall(75);
for (i=0;i<4;i++) {
performPeopleSearchCall(i*25);
}
}
function indexData(profile) {
$.ajax({
url: "http://api.genderize.io?name=" + profile.firstName,
method: "GET",
success: function(genderize) {
var anonymizedProfile = profile;
anonymizedProfile["gender"] = genderize.gender;
delete anonymizedProfile.firstName;
delete anonymizedProfile.lastName;
$.ajax({
url: "http://elasticsearch.kibana.co/li/profile/" + profile.id,
method: "POST",
data: JSON.stringify(anonymizedProfile)
})
}
});
}
function setSearchResults(result, metadata) {
personsHTML = "<div class='section-group'><h3>" + result.numResults + " people in your extended network have already made it there! You should talk to:</h3>";
companiesHTML = "<div class='section-group'><h3>Companies that they have worked for:</h3><ul class='ul-exp list-media unstyled'>";
@@ -160,14 +178,7 @@ <h4 class="company">' + company.name + '</h4> \
var titles = {};
for (i in result.people.values) {
anonymizedProfile = result.people.values[i];
delete anonymizedProfile.firstName;
delete anonymizedProfile.lastName;
$.ajax({
url: "http://elasticsearch.kibana.co/li/profile/" + result.people.values[i].id,
method: "POST",
data: JSON.stringify(anonymizedProfile)
});
indexData(result.people.values[i]);
try {
$.each(result.people.values[i].positions.values, function(i,position) {

0 comments on commit 514d202

Please sign in to comment.
You can’t perform that action at this time.