
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
A Node.js client for the Popcorn API used in PopcornTime.
npm install --save eztvapi
Here's an example how to fetch all the shows with all the episodes.
import * as eztvapi from 'eztvapi';
const client = eztvapi.createClient();
async function getAllShows() {
let allShows = [];
async function fetchShows(page) {
const shows = await client.getShows(page);
allShows = [
...allShows,
...shows,
];
if (!shows.length) {
return allShows;
}
return fetchShows(page + 1);
}
const shows = await fetchShows(1);
return Promise.all(shows.map(show => client.getShow(show.id)));
}
const shows = await getAllShows();
ShowStatus = 'returning_series' | 'in_production' | 'planned' | 'canceled' | 'ended' | 'unknown';
ShowRating = {
percentage: number;
watching: number;
votes: number;
loved: number;
hated: number;
};
ShowImageSet = {
poster: ?string;
fanart: ?string;
banner: ?string;
};
Torrent = {
provider: ?string;
peers: number;
seeds: number;
url: ?string;
};
Torrents = { [key: string]: Torrent };
Episode = {
tvdbId: ?string;
title: ?string;
episode: number;
season: number;
firstAired: ?Date;
dateBased: boolean;
overview: ?string;
torrents: ?Torrents;
};
ShowStub = {
id: string;
imdbId: ?string;
tvdbId: ?string;
title: string;
slug: string;
year: ?number;
seasons: ?number;
images: ShowImageSet;
rating: ?ShowRating;
};
Show = {
id: string;
imdbId: ?string;
tvdbId: ?string;
title: string;
slug: string;
year: ?number;
synopsis: ?string;
runtime: ?number;
country: ?string;
network: ?string;
airDay: ?string;
airTime: ?string;
status: ShowStatus;
seasons: ?number;
lastUpdated: ?Date;
episodes: Array<Episode>;
genres: Array<string>;
images: ShowImageSet;
rating: ?ShowRating;
};
EztvApiClient = {
getShows: (pageNumber?: number) => Promise<Array<ShowStub>>;
getShow: (id: string) => Promise<?Show>;
};
EztvApiClientOptions = {
endpoint?: string;
rateLimitRequests?: number;
rateLimitInterval?: number;
};
Create a new API client.
Arguments
options
endpoint
(string; optional; default: https://api-fetch.website/tv): HTTP or HTTPS endpoint of the APIrateLimitRequests
(number; optional; default: 1) Rate limit number of requests per intervalrateLimitInterval
(number; optional; default: 1000) Rate limit intervalReturns
Returns a new EztvApiClient instance.
Example
// client with 1000 requests per minute rate limit
const client = eztvapi.createClient({
rateLimitRequests: 1000,
rateLimitInterval: 60 * 1000,
});
Arguments
pageNumber
(number; optional; default: 1): Number of the requested pageReturns
A Promise
that resolves with an array of ShowStub. Note that if
the there are no entries on a given page it will return an empty array and not
throw.
Example
const shows = await client.getShows(6);
console.log(shows.map(show => show.title));
Get detailed information about a TV show including the list of episodes and magnet links.
Arguments
id
(string; required): The ID of the requested showReturns
A Promise
that resolves with a Show object. Note that if the show
could not be found it resolves with null
and does not throw.
Example
const show = await client.getShow('tt0944947');
if (show) {
console.log(show.title);
}
Copyright (c) 2015 - 2017 Max Kueng
MIT License
FAQs
A client for the Popcorn TV shows API, eztvapi.re
The npm package eztvapi receives a total of 3 weekly downloads. As such, eztvapi popularity was classified as not popular.
We found that eztvapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.