@gibme/tablo.tv 20.0.0
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/LICENSE +19 -0
- package/README.md +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/lighthouse.d.ts +155 -0
- package/dist/lighthouse.js +308 -0
- package/dist/lighthouse.js.map +1 -0
- package/dist/live_transcoder.d.ts +92 -0
- package/dist/live_transcoder.js +289 -0
- package/dist/live_transcoder.js.map +1 -0
- package/dist/tablo.d.ts +362 -0
- package/dist/tablo.js +465 -0
- package/dist/tablo.js.map +1 -0
- package/dist/tablo_api.d.ts +101 -0
- package/dist/tablo_api.js +228 -0
- package/dist/tablo_api.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2025, Brandon Lehmann <brandonlehmann@gmail.com>
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
// in the Software without restriction, including without limitation the rights
|
|
7
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
// furnished to do so, subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
// copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
// SOFTWARE.
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.TabloAPI = void 0;
|
|
35
|
+
const fetch_1 = __importDefault(require("@gibme/fetch"));
|
|
36
|
+
const uuid_1 = require("uuid");
|
|
37
|
+
const crypto_1 = require("crypto");
|
|
38
|
+
const logger_1 = __importDefault(require("@gibme/logger"));
|
|
39
|
+
class TabloAPI {
|
|
40
|
+
/**
|
|
41
|
+
* Constructs a new instance of the base API to interact with a Tablo device
|
|
42
|
+
* @param hostOrUri
|
|
43
|
+
* @param options
|
|
44
|
+
*/
|
|
45
|
+
constructor(hostOrUri, options) {
|
|
46
|
+
var _a, _b, _c, _d, _e;
|
|
47
|
+
var _f, _g, _h, _j, _k;
|
|
48
|
+
this.options = options;
|
|
49
|
+
this.timeout = 2000;
|
|
50
|
+
(_a = (_f = this.options).ssl) !== null && _a !== void 0 ? _a : (_f.ssl = false);
|
|
51
|
+
(_b = (_g = this.options).device_id) !== null && _b !== void 0 ? _b : (_g.device_id = (0, uuid_1.v4)());
|
|
52
|
+
(_c = (_h = this.options).timeout) !== null && _c !== void 0 ? _c : (_h.timeout = 2000);
|
|
53
|
+
(_d = (_j = this.options).request_logging) !== null && _d !== void 0 ? _d : (_j.request_logging = false);
|
|
54
|
+
(_e = (_k = this.options).port) !== null && _e !== void 0 ? _e : (_k.port = 8887);
|
|
55
|
+
if (hostOrUri.includes('://')) {
|
|
56
|
+
if (hostOrUri.endsWith('/')) {
|
|
57
|
+
hostOrUri = hostOrUri.slice(0, -1);
|
|
58
|
+
}
|
|
59
|
+
this.base_uri = hostOrUri;
|
|
60
|
+
this.options.ssl = this.base_uri.startsWith('https');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.base_uri = `${this.options.ssl ? 'https' : 'http'}://${hostOrUri}:${this.options.port}`;
|
|
64
|
+
}
|
|
65
|
+
this.keys = {
|
|
66
|
+
access_key: this.options.access_key,
|
|
67
|
+
secret_key: this.options.secret_key
|
|
68
|
+
};
|
|
69
|
+
this.device_id = this.options.device_id;
|
|
70
|
+
this.timeout = this.options.timeout;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Calculates the end time based upon the specified start time and duration
|
|
74
|
+
* @param start_time
|
|
75
|
+
* @param duration
|
|
76
|
+
* @protected
|
|
77
|
+
*/
|
|
78
|
+
calculate_endtime(start_time, duration) {
|
|
79
|
+
const date = new Date(start_time).getTime();
|
|
80
|
+
return new Date(date + (duration * 1000)).toISOString();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns the current hour timestamps
|
|
84
|
+
* @protected
|
|
85
|
+
*/
|
|
86
|
+
get currentHour() {
|
|
87
|
+
const now = Math.floor((new Date()).getTime() / 1000) * 1000;
|
|
88
|
+
const start = Math.floor(now / (60 * 60 * 1000)) * 60 * 60 * 1000;
|
|
89
|
+
const end = start + (60 * 60 * 1000);
|
|
90
|
+
return { now, start, end };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Batch operations are much faster than a bunch of single operations.
|
|
94
|
+
* For example, instead of making 50 requests for the first 50 recordings
|
|
95
|
+
* returned by Recordings - Get Airings, you can take those 50 paths
|
|
96
|
+
* and make 1 request to /batch to receive all the same data.
|
|
97
|
+
* @param endpoints
|
|
98
|
+
* @param timeout
|
|
99
|
+
* @protected
|
|
100
|
+
*/
|
|
101
|
+
batch(endpoints_1) {
|
|
102
|
+
return __awaiter(this, arguments, void 0, function* (endpoints, timeout = this.timeout) {
|
|
103
|
+
var _a;
|
|
104
|
+
try {
|
|
105
|
+
return (_a = yield this.post('/batch', undefined, endpoints, timeout)) !== null && _a !== void 0 ? _a : {};
|
|
106
|
+
}
|
|
107
|
+
catch (_b) {
|
|
108
|
+
return {};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Performs a DELETE request against the Tablo device
|
|
114
|
+
* @param endpoint
|
|
115
|
+
* @param params
|
|
116
|
+
* @param timeout
|
|
117
|
+
* @protected
|
|
118
|
+
*/
|
|
119
|
+
delete(endpoint_1) {
|
|
120
|
+
return __awaiter(this, arguments, void 0, function* (endpoint, params = {}, timeout = this.timeout) {
|
|
121
|
+
const response = yield this.execute('DELETE', endpoint, params, undefined, undefined, timeout);
|
|
122
|
+
return response.ok;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Performs a GET request against the Tablo device
|
|
127
|
+
* @param endpoint
|
|
128
|
+
* @param params
|
|
129
|
+
* @param timeout
|
|
130
|
+
* @param json
|
|
131
|
+
* @protected
|
|
132
|
+
*/
|
|
133
|
+
get(endpoint_1) {
|
|
134
|
+
return __awaiter(this, arguments, void 0, function* (endpoint, params = {}, timeout = this.timeout, json = true) {
|
|
135
|
+
const response = yield this.execute('GET', endpoint, params, undefined, undefined, timeout);
|
|
136
|
+
if (response.ok) {
|
|
137
|
+
if (json) {
|
|
138
|
+
return response.json();
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
return yield response.text();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Performs a PUT request against the Tablo device
|
|
148
|
+
* @param endpoint
|
|
149
|
+
* @param params
|
|
150
|
+
* @param payload
|
|
151
|
+
* @param timeout
|
|
152
|
+
* @param json
|
|
153
|
+
* @protected
|
|
154
|
+
*/
|
|
155
|
+
post(endpoint_1) {
|
|
156
|
+
return __awaiter(this, arguments, void 0, function* (endpoint, params = {}, payload, timeout = this.timeout, json = true) {
|
|
157
|
+
const response = yield this.execute('POST', endpoint, params, payload, undefined, timeout);
|
|
158
|
+
if (response.ok) {
|
|
159
|
+
if (json) {
|
|
160
|
+
return response.json();
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
return yield response.text();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Executes an API call to the Tablo device
|
|
170
|
+
* @param method
|
|
171
|
+
* @param endpoint
|
|
172
|
+
* @param params
|
|
173
|
+
* @param payload
|
|
174
|
+
* @param keys
|
|
175
|
+
* @param timeout
|
|
176
|
+
* @private
|
|
177
|
+
*/
|
|
178
|
+
execute(method_1, endpoint_1) {
|
|
179
|
+
return __awaiter(this, arguments, void 0, function* (method, endpoint, params = {}, payload, keys = this.keys, timeout = this.timeout) {
|
|
180
|
+
const headers = this.generateAuthHeader(method, endpoint, payload ? JSON.stringify(payload) : undefined, keys);
|
|
181
|
+
const qs = new URLSearchParams();
|
|
182
|
+
for (const [key, value] of Object.entries(params)) {
|
|
183
|
+
qs.set(key, value !== null && value !== void 0 ? value : '');
|
|
184
|
+
}
|
|
185
|
+
let url = `${this.base_uri}${endpoint}`;
|
|
186
|
+
if (Object.entries(params).length > 0) {
|
|
187
|
+
url += `?${qs.toString()}`;
|
|
188
|
+
}
|
|
189
|
+
if (this.options.request_logging) {
|
|
190
|
+
logger_1.default.debug('%s %s %s %s', method, JSON.stringify(headers), url, payload ? JSON.stringify(payload) : '');
|
|
191
|
+
}
|
|
192
|
+
return (0, fetch_1.default)(url, {
|
|
193
|
+
headers,
|
|
194
|
+
json: (method === 'PATCH' || method === 'POST' || method === 'PUT') ? payload : undefined,
|
|
195
|
+
method,
|
|
196
|
+
timeout
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Generates the authentication header required for some of the Tablo device API calls
|
|
202
|
+
* @param method
|
|
203
|
+
* @param path
|
|
204
|
+
* @param body
|
|
205
|
+
* @param keys
|
|
206
|
+
* @private
|
|
207
|
+
*/
|
|
208
|
+
generateAuthHeader(method, path, body = '', keys = this.keys) {
|
|
209
|
+
const date = (new Date()).toUTCString();
|
|
210
|
+
const body_hash = body
|
|
211
|
+
? (0, crypto_1.createHash)('md5')
|
|
212
|
+
.update(body)
|
|
213
|
+
.digest('hex')
|
|
214
|
+
: '';
|
|
215
|
+
const message = `${method}\n${path}\n${body_hash}\n${date}`;
|
|
216
|
+
const hmac_signature = (0, crypto_1.createHmac)('md5', keys.secret_key)
|
|
217
|
+
.update(message)
|
|
218
|
+
.digest('hex')
|
|
219
|
+
.toUpperCase();
|
|
220
|
+
return {
|
|
221
|
+
Authorization: `tablo:${keys.access_key}:${hmac_signature}`,
|
|
222
|
+
Date: date
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
exports.TabloAPI = TabloAPI;
|
|
227
|
+
exports.default = TabloAPI;
|
|
228
|
+
//# sourceMappingURL=tablo_api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tablo_api.js","sourceRoot":"","sources":["../src/tablo_api.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
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2025, Brandon Lehmann <brandonlehmann@gmail.com>
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
// in the Software without restriction, including without limitation the rights
|
|
7
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
// furnished to do so, subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
// copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
// SOFTWARE.
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gibme/tablo.tv",
|
|
3
|
+
"version": "20.0.0",
|
|
4
|
+
"description": "API interface for interacting with a Tablo TV device",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/*"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "yarn build:typescript",
|
|
13
|
+
"build:docs": "./node_modules/.bin/typedoc",
|
|
14
|
+
"build:typescript": "./node_modules/.bin/tsc",
|
|
15
|
+
"test": "yarn test:style && yarn test:typecheck && yarn test:mocha",
|
|
16
|
+
"test:typecheck": "./node_modules/.bin/tsc --noEmit",
|
|
17
|
+
"test:style": "yarn style",
|
|
18
|
+
"test:mocha": "./node_modules/.bin/mocha --exit --timeout 120000 --require ts-node/register test/test.ts",
|
|
19
|
+
"style": "./node_modules/.bin/eslint src/**/*.ts test/**/*.ts",
|
|
20
|
+
"fix-style": "./node_modules/.bin/eslint --fix src/**/*.ts test/**/*.ts",
|
|
21
|
+
"fix:style": "yarn fix-style",
|
|
22
|
+
"prepublishOnly": "yarn build"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/gibme-npm/tablo.tv.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/gibme-npm/tablo.tv/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://gibme-npm.github.io/tablo.tv/",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=20"
|
|
34
|
+
},
|
|
35
|
+
"engineStrict": true,
|
|
36
|
+
"author": {
|
|
37
|
+
"name": "Brandon Lehmann",
|
|
38
|
+
"email": "brandonlehmann@gmail.com"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@gibme/cache": "^20.0.0",
|
|
42
|
+
"@gibme/fetch": "^20.0.0",
|
|
43
|
+
"@gibme/logger": "^20.0.0",
|
|
44
|
+
"@gibme/timer": "^20.0.0",
|
|
45
|
+
"@types/which": "^3.0.4",
|
|
46
|
+
"ffmpeg-static": "^5.2.0",
|
|
47
|
+
"uuid": "^11.1.0",
|
|
48
|
+
"which": "^5.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/mocha": "^10.0.10",
|
|
52
|
+
"@types/node": "^24.3.0",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
54
|
+
"@typescript-eslint/parser": "^6.19.1",
|
|
55
|
+
"dotenv": "^17.2.1",
|
|
56
|
+
"eslint": "^8.56.0",
|
|
57
|
+
"eslint-config-standard": "^17.1.0",
|
|
58
|
+
"eslint-plugin-import": "^2.29.1",
|
|
59
|
+
"eslint-plugin-n": "^16.6.2",
|
|
60
|
+
"eslint-plugin-node": "^11.1.0",
|
|
61
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
62
|
+
"mocha": "^11.7.1",
|
|
63
|
+
"ts-node": "^10.9.2",
|
|
64
|
+
"typedoc": "^0.28.4",
|
|
65
|
+
"typescript": "^5.9.2"
|
|
66
|
+
}
|
|
67
|
+
}
|