function ApiClient(config) {
  var self = this
  this.config = _.extend({}, config, {client:this})
  config.headers = _.extend({}, config.headers, { Accept: 'application/json' })

  this.auth = config.auth

  models.sync = require('./sync')
  models.Model = require('./modelbase')
  models.NginModel = require('./nginModel')

  // add each model to the ApiClient
  Object.keys(models).forEach(function(modelName) {
    Object.defineProperty(self, modelName, {
      get: function() { return models[modelName](self) },
      enumerable:true,
      configurable:true
    })
  })
  _.extend(this, models)
}
function ApiClient(config) {
  var self = this
  this.config = _.extend({}, config, {client:this})
  config.headers = _.extend({}, config.headers, { Accept: 'application/json' })

  this.auth = config.auth

  models.sync = require('./sync')
  models.Model = require('./modelbase')
  models.NginModel = require('./nginModel')

  // add each model to the ApiClient
  Object.keys(models).forEach(function(modelName) {
    Object.defineProperty(self, modelName, {
      get: function() { return models[modelName](self) },
      enumerable:true,
      configurable:true
    })
  })
  _.extend(this, models)
}
function ApiClient ( config ) { var self = this this . config = _ . extend ( { } , config , { client : this } ) config . headers = _ . extend ( { } , config . headers , { Accept : 'application/json' } ) this . auth = config . auth models . sync = require ( './sync' ) models . Model = require ( './modelbase' ) models . NginModel = require ( './nginModel' ) // add each model to the ApiClient Object . keys ( models ) . forEach ( function ( modelName ) { Object . defineProperty ( self , modelName , { get : function ( ) { return models [ modelName ] ( self ) } , enumerable : true , configurable : true } ) } ) _ . extend ( this , models ) }
Common entry point for all API models

@param {Object} config
@api public
Common entry point for all API models