sa-kws-node-sdk
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -28,2 +28,3 @@ var BPromise = require('bluebird'); | ||
* - logger: loger function, by default console.log * | ||
* - language: 2 letter ISO code ("en" by default) * | ||
*/ | ||
@@ -46,2 +47,3 @@ | ||
this.opts.allowedDomains = opts.allowedDomains || []; | ||
this.opts.language = this.opts.language || 'en'; | ||
@@ -154,3 +156,6 @@ this.bearerToken = null; | ||
.then(function () { | ||
opts.headers = {'Authorization': 'Bearer ' + self.bearerToken}; | ||
opts.headers = { | ||
'Authorization': 'Bearer ' + self.bearerToken, | ||
'Accept-Language': self.opts.language | ||
}; | ||
return rp[method](path, opts); | ||
@@ -209,2 +214,7 @@ }); | ||
module.exports = KwsSdk; | ||
KwsSdk.prototype.setLanguage = function (language) { | ||
this.opts.language = language; | ||
}; | ||
module.exports = KwsSdk; |
{ | ||
"name": "sa-kws-node-sdk", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "KWS Node App SDK", | ||
@@ -5,0 +5,0 @@ "main": "./lib/kwsSdk.js", |
39946
1013