@como/como-client 0.7.93 → 0.7.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/como.js +397 -344
- package/package.json +1 -1
- package/src/como.js +17 -0
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -303,6 +303,23 @@ class Como {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
/**
|
|
307
|
+
* @param {string} language language code
|
|
308
|
+
*/
|
|
309
|
+
async updateLanguage(language) {
|
|
310
|
+
const { api } = this.comoData;
|
|
311
|
+
try {
|
|
312
|
+
const data = await api.updateLanguage(language);
|
|
313
|
+
return data;
|
|
314
|
+
} catch (error) {
|
|
315
|
+
if (error.response && error.response.data) {
|
|
316
|
+
const { code, message } = error.response.data;
|
|
317
|
+
throw new Error(code || message);
|
|
318
|
+
}
|
|
319
|
+
throw error;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
306
323
|
/**
|
|
307
324
|
*
|
|
308
325
|
* @param {string} unsubscribeSms unsubscribe user at location
|