Add support for specifying API configuration to Cylon#api
This commit is contained in:
parent
25119c170f
commit
668acf1e18
|
@ -60,7 +60,11 @@ Cylon.robot = function robot(opts) {
|
||||||
// Public: Creates a new API based on passed options
|
// Public: Creates a new API based on passed options
|
||||||
//
|
//
|
||||||
// Returns nothing
|
// Returns nothing
|
||||||
Cylon.api = function api() {
|
Cylon.api = function api(opts) {
|
||||||
|
if (typeof opts === 'object') {
|
||||||
|
this.config({ api: opts });
|
||||||
|
}
|
||||||
|
|
||||||
var API = require('./api');
|
var API = require('./api');
|
||||||
|
|
||||||
var config = Utils.fetch(Config, 'api', {});
|
var config = Utils.fetch(Config, 'api', {});
|
||||||
|
|
Loading…
Reference in New Issue