@xiboplayer/xmds 0.7.0 → 0.7.2
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/package.json +2 -2
- package/src/rest-client.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiboplayer/xmds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "XMDS SOAP client for Xibo CMS communication",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./schedule-parser": "./src/schedule-parser.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@xiboplayer/utils": "0.7.
|
|
15
|
+
"@xiboplayer/utils": "0.7.2"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"vitest": "^2.0.0"
|
package/src/rest-client.js
CHANGED
|
@@ -109,6 +109,14 @@ export class RestClient {
|
|
|
109
109
|
log.info(`Authenticated as display ${this._displayId}`);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Get current token synchronously (may be null or expired).
|
|
114
|
+
* @returns {string|null}
|
|
115
|
+
*/
|
|
116
|
+
getToken() {
|
|
117
|
+
return this._token;
|
|
118
|
+
}
|
|
119
|
+
|
|
112
120
|
/**
|
|
113
121
|
* Get a valid JWT token, refreshing if expired or missing.
|
|
114
122
|
*/
|