node-csfd-api 2.9.0 → 2.10.1
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/README.md +38 -0
- package/helpers/user-ratings.helper.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
> - Tested (~100% Code coverage)
|
|
13
13
|
> - ✅ Ready for new ČSFD 2025!
|
|
14
14
|
> - You can use in:
|
|
15
|
+
> - Docker – [_How to do it?_](#-docker)
|
|
15
16
|
> - Firebase function
|
|
16
17
|
> - AWS λ (lambda function)
|
|
17
18
|
> - CloudFlare Worker
|
|
@@ -361,6 +362,43 @@ csfd
|
|
|
361
362
|
|
|
362
363
|
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
|
|
363
364
|
|
|
365
|
+
## 📦 Docker
|
|
366
|
+
|
|
367
|
+
You can use this library in Docker.
|
|
368
|
+
|
|
369
|
+
We have [prepared a Docker image](https://hub.docker.com/r/bartholomej/node-csfd-api) for you.
|
|
370
|
+
|
|
371
|
+
### Prebuilt image
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
docker pull bartholomej/node-csfd-api
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Build & run your own image
|
|
378
|
+
|
|
379
|
+
> Build image
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
docker build -t node-csfd-api .
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
> Run image on port 3000
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
docker run -p 3000:3000 node-csfd-api
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
> Open http://localhost:3000
|
|
392
|
+
|
|
393
|
+
### API endpoints
|
|
394
|
+
|
|
395
|
+
> Some examples
|
|
396
|
+
|
|
397
|
+
- `/movies/535121`
|
|
398
|
+
- `/search/quentin+tarantino`
|
|
399
|
+
- `/creators/2120`
|
|
400
|
+
- `/user-ratings/912-bart`
|
|
401
|
+
|
|
364
402
|
## 🧑💻 Used by
|
|
365
403
|
|
|
366
404
|
### Web extensions
|
|
@@ -23,7 +23,8 @@ const getTitle = (el) => {
|
|
|
23
23
|
};
|
|
24
24
|
exports.getTitle = getTitle;
|
|
25
25
|
const getYear = (el) => {
|
|
26
|
-
|
|
26
|
+
var _a;
|
|
27
|
+
return +((_a = el.querySelectorAll('td.name .film-title-info .info')[0]) === null || _a === void 0 ? void 0 : _a.text.slice(1, -1)) || null;
|
|
27
28
|
};
|
|
28
29
|
exports.getYear = getYear;
|
|
29
30
|
const getColorRating = (el) => {
|