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

tmdb-ts

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmdb-ts - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

dist/endpoints/collections.d.ts

4

dist/api.js

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const node_fetch_1 = __importDefault(require("node-fetch"));
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const BASE_URL_V3 = 'https://api.themoviedb.org/3';

@@ -15,3 +15,3 @@ class Api {

async get(path) {
const response = await node_fetch_1.default(`${BASE_URL_V3}${path}`, {
const response = await (0, cross_fetch_1.default)(`${BASE_URL_V3}${path}`, {
method: 'GET',

@@ -18,0 +18,0 @@ headers: {

@@ -10,1 +10,8 @@ export * from './account';

export * from './tv-shows';
export * from './discover';
export * from './people';
export * from './review';
export * from './trending';
export * from './find';
export * from './keywords';
export * from './collections';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -22,2 +26,9 @@ if (k2 === undefined) k2 = k;

__exportStar(require("./tv-shows"), exports);
__exportStar(require("./discover"), exports);
__exportStar(require("./people"), exports);
__exportStar(require("./review"), exports);
__exportStar(require("./trending"), exports);
__exportStar(require("./find"), exports);
__exportStar(require("./keywords"), exports);
__exportStar(require("./collections"), exports);
//# sourceMappingURL=index.js.map
import { BaseEndpoint } from './base';
import { AlternativeTitles, ChangeOptions, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LatestTvShows, OnTheAir, PopularTvShows, Recommendations, Reviews, ScreenedTheatrically, SimilarTvShows, TopRatedTvShows, Translations, TvShowChanges, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
import { AlternativeTitles, ChangeOptions, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LatestTvShows, OnTheAir, PopularTvShows, Recommendations, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChanges, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
export declare class TvShowsEndpoint extends BaseEndpoint {

@@ -11,2 +11,3 @@ protected readonly accessToken: string;

credits(id: number): Promise<Credits>;
season(tvId: number, seasonNumber: number): Promise<SeasonDetails>;
episodeGroups(id: number): Promise<EpisodeGroups>;

@@ -13,0 +14,0 @@ externalIds(id: number): Promise<ExternalIds>;

@@ -31,2 +31,5 @@ "use strict";

}
async season(tvId, seasonNumber) {
return await this.api.get(`${BASE_TV}/${tvId}/season/${seasonNumber}`);
}
async episodeGroups(id) {

@@ -33,0 +36,0 @@ return await this.api.get(`${BASE_TV}/${id}/episode_groups`);

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -1,2 +0,2 @@

import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint } from './endpoints';
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint } from './endpoints';
export default class TMDB {

@@ -14,2 +14,9 @@ private readonly accessToken;

get tvShows(): TvShowsEndpoint;
get discover(): DiscoverEndpoint;
get people(): PeopleEndpoint;
get review(): ReviewEndpoint;
get trending(): TrendingEndpoint;
get find(): FindEndpoint;
get keywords(): KeywordsEndpoint;
get collections(): CollectionsEndpoint;
}

@@ -35,4 +35,25 @@ "use strict";

}
get discover() {
return new endpoints_1.DiscoverEndpoint(this.accessToken);
}
get people() {
return new endpoints_1.PeopleEndpoint(this.accessToken);
}
get review() {
return new endpoints_1.ReviewEndpoint(this.accessToken);
}
get trending() {
return new endpoints_1.TrendingEndpoint(this.accessToken);
}
get find() {
return new endpoints_1.FindEndpoint(this.accessToken);
}
get keywords() {
return new endpoints_1.KeywordsEndpoint(this.accessToken);
}
get collections() {
return new endpoints_1.CollectionsEndpoint(this.accessToken);
}
}
exports.default = TMDB;
//# sourceMappingURL=tmdb.js.map

@@ -1,2 +0,2 @@

import { Person } from './';
import { Image, Person } from './';
export interface CreditSeason {

@@ -75,24 +75,6 @@ air_date?: string;

}
export interface Backdrop {
aspect_ratio: number;
file_path: string;
height: number;
iso_639_1?: any;
vote_average: number;
vote_count: number;
width: number;
}
export interface Poster {
aspect_ratio: number;
file_path: string;
height: number;
iso_639_1: string;
vote_average: number;
vote_count: number;
width: number;
}
export interface CreditImages {
export interface ImageCollection {
id: number;
backdrops: Backdrop[];
posters: Poster[];
backdrops: Image[];
posters: Image[];
}

@@ -113,8 +95,1 @@ export interface Video {

}
export interface Keywords {
id: number;
keywords: Array<{
id: number;
name: string;
}>;
}

@@ -0,1 +1,2 @@

export * from './options';
export * from './certification';

@@ -9,2 +10,9 @@ export * from './credits';

export * from './watch-providers';
export * from './people';
export * from './discover';
export * from './review';
export * from './trending';
export * from './find';
export * from './keywords';
export * from './collections';
export interface AuthorDetails {

@@ -43,12 +51,4 @@ name: string;

}
export interface Collection {
id: number;
backdrop_path: string;
name: string;
poster_path: string;
}
export interface Movie {
id: number;
logo_path: string;
name: string;
poster_path: string;

@@ -177,1 +177,10 @@ adult: boolean;

}
export interface Image {
aspect_ratio: number;
file_path: string;
height: number;
iso_639_1: string;
vote_average: number;
vote_count: number;
width: number;
}
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -13,2 +17,3 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./options"), exports);
__exportStar(require("./certification"), exports);

@@ -22,2 +27,9 @@ __exportStar(require("./credits"), exports);

__exportStar(require("./watch-providers"), exports);
__exportStar(require("./people"), exports);
__exportStar(require("./discover"), exports);
__exportStar(require("./review"), exports);
__exportStar(require("./trending"), exports);
__exportStar(require("./find"), exports);
__exportStar(require("./keywords"), exports);
__exportStar(require("./collections"), exports);
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Crew } from './';
export interface CreatedBy {

@@ -69,2 +69,40 @@ id: number;

}
export interface GuestStar {
credit_id: string;
order: number;
character: string;
adult: boolean;
gender: number | null;
id: number;
known_for_department: string;
name: string;
original_name: string;
popularity: number;
profile_path: string | null;
}
export interface Episode {
air_date: string;
episode_number: number;
crew: Crew[];
guest_stars: GuestStar[];
id: number;
name: string;
overview: string;
production_code: string;
season_number: number;
still_path: string;
vote_average: number;
vote_count: number;
show_id: number;
runtime: number;
}
export interface SeasonDetails {
air_date: string;
episodes: Episode[];
name: string;
overview: string;
id: number;
poster_path: string | null;
season_number: number;
}
export interface TvShowItem {

@@ -71,0 +109,0 @@ id: string;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

{
"name": "tmdb-ts",
"version": "0.1.5",
"version": "0.1.6",
"description": "TMDB v3 library wrapper",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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