lib/page.js
function(callback){
    var options = this.options,
        cache = this.options.cache,
        logger =  this.options.logger;
    
    if(this.apiInterface){
      logger.info('fetch data from api: ' + this.apiInterface.name);
    
      var sgn = this.profile.identity.sgn || '',
          self = this;

      try
      {
        this.apiInterface.getProfile(this.url, sgn, options, function(hCard){
          if(hCard){
            self.profile.hCards = [hCard];
          }
          self.status = "fetched";
          callback();
        });
      }
      catch(err)
      {
        logger.warn('error getting api data with plugin for: ' + self.domain + ' - ' + err);
        self.error = err;
        self.status = "errored";
        callback();
      }
    }


  }
function(callback){
    var options = this.options,
        cache = this.options.cache,
        logger =  this.options.logger;
    
    if(this.apiInterface){
      logger.info('fetch data from api: ' + this.apiInterface.name);
    
      var sgn = this.profile.identity.sgn || '',
          self = this;

      try
      {
        this.apiInterface.getProfile(this.url, sgn, options, function(hCard){
          if(hCard){
            self.profile.hCards = [hCard];
          }
          self.status = "fetched";
          callback();
        });
      }
      catch(err)
      {
        logger.warn('error getting api data with plugin for: ' + self.domain + ' - ' + err);
        self.error = err;
        self.status = "errored";
        callback();
      }
    }


  }
function ( callback ) { var options = this . options , cache = this . options . cache , logger = this . options . logger ; if ( this . apiInterface ) { logger . info ( 'fetch data from api: ' + this . apiInterface . name ) ; var sgn = this . profile . identity . sgn || '' , self = this ; try { this . apiInterface . getProfile ( this . url , sgn , options , function ( hCard ) { if ( hCard ) { self . profile . hCards = [ hCard ] ; } self . status = "fetched" ; callback ( ) ; } ) ; } catch ( err ) { logger . warn ( 'error getting api data with plugin for: ' + self . domain + ' - ' + err ) ; self . error = err ; self . status = "errored" ; callback ( ) ; } } }
uses plug-in interface to get profile from an api
uses plug - in interface to get profile from an api