Skip to content

Commit 96e0cf2

Browse files
authored
Merge pull request #67 from bartholomej/feat/user-reviews
User reviews
2 parents 441c81d + d4c3be9 commit 96e0cf2

17 files changed

+2050
-58
lines changed

README.md

Lines changed: 116 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ npm install node-csfd-api
3131

3232
- [Movies and TV Series](#Movie)
3333
- [User Ratings](#User-Ratings)
34+
- [User Reviews](#User-Reviews)
3435
- [Search](#Search)
3536
- [Creators](#Creators)
3637

@@ -46,7 +47,7 @@ csfd.movie(535121).then((movie) => console.log(movie));
4647

4748
<details>
4849
<summary>Click here to see full result example</summary>
49-
50+
5051
```javascript
5152
{
5253
id: 535121,
@@ -138,6 +139,7 @@ csfd.movie(535121).then((movie) => console.log(movie));
138139
]
139140
}
140141
```
142+
141143
</details>
142144

143145
### Search
@@ -152,7 +154,7 @@ csfd.search('bart').then((search) => console.log(search));
152154

153155
<details>
154156
<summary>Click here to see full result example</summary>
155-
157+
156158
```javascript
157159
[
158160
{
@@ -323,6 +325,20 @@ csfd
323325
.then((ratings) => console.log(ratings));
324326
```
325327

328+
#### Specific page
329+
330+
Get [second page of my ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/?page=2)
331+
332+
```javascript
333+
import { csfd } from 'node-csfd-api';
334+
335+
csfd
336+
.userRatings('912-bart', {
337+
page: 2 // Get specific page
338+
})
339+
.then((ratings) => console.log(ratings));
340+
```
341+
326342
<details>
327343
<summary>Click here to see full result example</summary>
328344

@@ -359,6 +375,98 @@ csfd
359375
| **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` |
360376
| **allPages** | boolean | false | Get all pages |
361377
| **allPagesDelay** | number | 0 | Delay on each page request. In milliseconds |
378+
| **page** | number | 1 | Specific page number to fetch (e.g., 2 for page 2) |
379+
380+
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
381+
382+
### User Reviews
383+
384+
#### Last reviews (last page)
385+
386+
Get [user's last reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/)
387+
388+
```javascript
389+
import { csfd } from 'node-csfd-api';
390+
391+
csfd.userReviews(195357).then((reviews) => console.log(reviews));
392+
```
393+
394+
#### All reviews (all pages)
395+
396+
> Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute.
397+
398+
Get [all user reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/)
399+
400+
```javascript
401+
import { csfd } from 'node-csfd-api';
402+
403+
csfd
404+
.userReviews(195357, {
405+
allPages: true, // Download all pages (one by one)
406+
allPagesDelay: 2000 // Make delay 2000ms on each page request
407+
})
408+
.then((reviews) => console.log(reviews));
409+
```
410+
411+
#### Specific page
412+
413+
Get [second page of user reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/?page=2)
414+
415+
```javascript
416+
import { csfd } from 'node-csfd-api';
417+
418+
csfd
419+
.userReviews(195357, {
420+
page: 2 // Get specific page
421+
})
422+
.then((reviews) => console.log(reviews));
423+
```
424+
425+
<details>
426+
<summary>Click here to see full result example</summary>
427+
428+
```javascript
429+
[
430+
{
431+
id: 1391448,
432+
title: 'Co s Péťou?',
433+
year: 2025,
434+
type: 'film',
435+
url: 'https://www.csfd.cz/film/1391448-co-s-petou/prehled/',
436+
colorRating: 'good',
437+
userDate: '27.11.2025',
438+
userRating: 4,
439+
text: 'Co s Péťou? Inu, co by? Každý normální Sparťan by to okamžitě mrdnul z útesu...',
440+
poster:
441+
'https://image.pmgstatic.com/cache/resized/w240h339/files/images/film/posters/170/492/170492173_1l3djd.jpg'
442+
},
443+
{
444+
id: 1530416,
445+
title: 'Kouzlo derby',
446+
year: 2025,
447+
type: 'film',
448+
url: 'https://www.csfd.cz/film/1530416-kouzlo-derby/prehled/',
449+
colorRating: 'average',
450+
userDate: '26.11.2025',
451+
userRating: 1,
452+
text: 'Typické kolečkoidní sebevykradačské pásmo klišovitých...',
453+
poster:
454+
'https://image.pmgstatic.com/cache/resized/w240h339/files/images/film/posters/170/230/170230377_cimu90.jpg'
455+
}
456+
];
457+
```
458+
459+
</details>
460+
461+
#### Options for user reviews
462+
463+
| Option | Type | Default | Description |
464+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------ |
465+
| **includesOnly** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Including only film types. eg. `['seriál', 'koncert']` |
466+
| **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` |
467+
| **allPages** | boolean | false | Get all pages |
468+
| **allPagesDelay** | number | 0 | Delay on each page request. In milliseconds |
469+
| **page** | number | 1 | Specific page number to fetch (e.g., 2 for page 2) |
362470

363471
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
364472

@@ -398,6 +506,7 @@ docker run -p 3000:3000 node-csfd-api
398506
- `/search/quentin+tarantino`
399507
- `/creator/2120`
400508
- `/user-ratings/912-bart`
509+
- `/user-reviews/195357`
401510

402511
## 🧑‍💻 Used by
403512

@@ -449,7 +558,7 @@ docker run -p 3000:3000 node-csfd-api
449558
- [x] Similar movies
450559
- [x] Trivia
451560
- [x] Photo from movie (random)
452-
- [ ] Reviews
561+
- [ ] Reviews (from movie page)
453562
- [ ] OST
454563
- [ ] Search
455564
- [x] Movies
@@ -462,6 +571,10 @@ docker run -p 3000:3000 node-csfd-api
462571
- [x] User Ratings
463572
- [x] Last ratings
464573
- [x] All pages
574+
- [x] User Reviews
575+
- [x] Last reviews
576+
- [x] All pages
577+
- [ ] Filter by type
465578

466579
## 🛠️ Development
467580

0 commit comments

Comments
 (0)