lib/marathon.js
function Marathon(opts) {
  if (!(this instanceof Marathon)) {
    return new Marathon(opts);
  }

  opts = opts || {};

  if (!opts.baseUrl) {
    opts.baseUrl = (opts.secure ? 'https:' : 'http:') + '//' +
      (opts.host || '127.0.0.1') + ':' +
      (opts.port || '8080') + '/v2';
  }
  opts.name = 'marathon';
  opts.type = 'json';

  papi.Client.call(this, opts);

  this.app = new App(this);
  this.eventSubscription = new EventSubscription(this);
}
function Marathon(opts) {
  if (!(this instanceof Marathon)) {
    return new Marathon(opts);
  }

  opts = opts || {};

  if (!opts.baseUrl) {
    opts.baseUrl = (opts.secure ? 'https:' : 'http:') + '//' +
      (opts.host || '127.0.0.1') + ':' +
      (opts.port || '8080') + '/v2';
  }
  opts.name = 'marathon';
  opts.type = 'json';

  papi.Client.call(this, opts);

  this.app = new App(this);
  this.eventSubscription = new EventSubscription(this);
}
function Marathon ( opts ) { if ( ! ( this instanceof Marathon ) ) { return new Marathon ( opts ) ; } opts = opts || { } ; if ( ! opts . baseUrl ) { opts . baseUrl = ( opts . secure ? 'https:' : 'http:' ) + '//' + ( opts . host || '127.0.0.1' ) + ':' + ( opts . port || '8080' ) + '/v2' ; } opts . name = 'marathon' ; opts . type = 'json' ; papi . Client . call ( this , opts ) ; this . app = new App ( this ) ; this . eventSubscription = new EventSubscription ( this ) ; }
Initialize a new `Marathon` client.

@param {Object} opts
Initialize a new Marathon client .