Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-csfd-api

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-csfd-api - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

fetchers/index.d.ts

13

index.d.ts

@@ -1,1 +0,12 @@

export { Csfd } from './scraper';
import { CSFDFilmTypes } from './interfaces/global';
import { CSFDUserRatings } from './interfaces/user-ratings';
import { UserRatingsScraper } from './services/user-ratings';
export declare class Csfd {
private userRatingsService;
constructor(userRatingsService: UserRatingsScraper);
userRatings(user: string | number, config?: {
includesOnly?: CSFDFilmTypes[];
excludes?: CSFDFilmTypes[];
}): Promise<CSFDUserRatings[]>;
}
export declare const csfd: Csfd;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Csfd = void 0;
var scraper_1 = require("./scraper");
Object.defineProperty(exports, "Csfd", { enumerable: true, get: function () { return scraper_1.Csfd; } });
exports.csfd = exports.Csfd = void 0;
const user_ratings_1 = require("./services/user-ratings");
class Csfd {
constructor(userRatingsService) {
this.userRatingsService = userRatingsService;
}
async userRatings(user, config) {
return this.userRatingsService.userRatings(user, config);
}
}
exports.Csfd = Csfd;
const userRatingsScraper = new user_ratings_1.UserRatingsScraper();
exports.csfd = new Csfd(userRatingsScraper);

10

package.json
{
"name": "node-csfd-api",
"version": "0.2.2",
"version": "0.3.0",
"description": "Simple NPM library for scraping CSFD",

@@ -21,2 +21,6 @@ "main": "./index.js",

},
"dependencies": {
"cross-fetch": "^3.0.6",
"node-html-parser": "^1.4.8"
},
"repository": {

@@ -43,8 +47,4 @@ "url": "git+https://github.com/bartholomej/csfd-ratings.git",

"license": "MIT",
"dependencies": {
"cross-fetch": "^3.0.6",
"node-html-parser": "^1.4.5"
},
"module": "./index.js",
"types": "./index.d.ts"
}

@@ -0,1 +1,6 @@

[![npm version](https://badge.fury.io/js/node-csfd-api.svg)](https://badge.fury.io/js/node-csfd-api)
[![Package License](https://img.shields.io/npm/l/node-csfd-api.svg)](https://www.npmjs.com/node-csfd-api)
[![Build & Publish](https://github.com/bartholomej/node-csfd-api/workflows/Build%20&%20Publish/badge.svg)](https://github.com/bartholomej/node-csfd-api/actions)
[![codecov](https://codecov.io/gh/bartholomej/node-csfd-api/branch/master/graph/badge.svg?token=YQH9UoVrGP)](https://codecov.io/gh/bartholomej/node-csfd-api)
# CSFD API

@@ -29,6 +34,4 @@

```javascript
import { Csfd } from 'node-csfd-api';
import { csfd } from 'node-csfd-api';
const csfd = new Csfd();
csfd.userRatings('912-bart').then((ratings) => console.log(ratings));

@@ -42,9 +45,18 @@ ```

{
title: 'Watchmen - This Extraordinary Being (E06)',
year: 2019,
type: 'epizoda',
title: 'David Attenborough: Život na naší planetě',
year: 2020,
type: 'film',
rating: 5,
url: 'https://www.csfd.cz',
date: '25.11.2019',
quality: 1
url: 'https://www.csfd.cz/film/812944-david-attenborough-zivot-na-nasi-planete/',
date: '01.11.2020',
overallRating: 1
},
{
title: 'Coronation',
year: 2020,
type: 'film',
rating: 4,
url: 'https://www.csfd.cz/film/912552-coronation/',
date: '28.10.2020',
overallRating: 1
}

@@ -51,0 +63,0 @@ ];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc