Source: site.view [edit]
Function name: cmdGetConnections
Arguments:
Description: Adds all connections for a user to the resume database
Page type: webl
Render function:  
Module: skillsrank

Page source:

var accessToken = (Wub_GetVaultValue("skillsrankLinkedInToken") ? nil);
if (accessToken != nil) then

   var res = true;
   var response = WubCall("cmdQueryConnections", []);
   wubvars.connections := response;
   var persons = WubCall("cmdParseObject", [response, "person"] );
   var numPersons = Size(persons);
   wubvars.person := persons[0];
   every person in persons do
      // var person = persons[0];
      var optimize = (person == persons[Size(persons)-1]);
      person = WubCall("cmdAddDerivedFields", [person]) ? "Error: " + person.id;
      // res = response; // ToString(person) + "\n";
      var pic = person["picture-url"] ? nil;
      if (pic != nil) then
         var h = HeadURL(pic) ? nil;
         if h == nil then
         person["picture-url"] := "";
         end;
      end;
      var addedNew = WubCall("cmdAddPerson", [person, optimize]);
   end;

   res;                  
   
else
   "No access token"
end