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

@charliehess/tmdb

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@charliehess/tmdb - npm Package Compare versions

Comparing version 1.5.3 to 1.6.0

14

dist/api.js

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

};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,2 +13,3 @@ exports.TMDbAPI = void 0;

const utils_1 = require("./utils");
const fetchImpl = (_a = window.fetch) !== null && _a !== void 0 ? _a : require('node-fetch');
const TMDB_URL = 'https://api.themoviedb.org/3';

@@ -83,3 +85,3 @@ const SEARCH_PATH = 'search';

const [movies, tvShows] = await Promise.all([interfaces_1.MediaType.MOVIE, interfaces_1.MediaType.TV_SHOW].map(async (type) => {
const { results } = await fetch(this.searchQueryURL(query, type), {
const { results } = await fetchImpl(this.searchQueryURL(query, type), {
headers: this.headers,

@@ -110,3 +112,3 @@ }).then((r) => r.json());

});
const response = await fetch(url.href, {
const response = await fetchImpl(url.href, {
headers: this.headers,

@@ -133,3 +135,3 @@ }).then((r) => r.json());

throw new Error('Missing argument');
const media = await fetch(`${TMDB_URL}/${type}/${id}`, {
const media = await fetchImpl(`${TMDB_URL}/${type}/${id}`, {
headers: this.headers,

@@ -147,3 +149,3 @@ }).then((r) => r.json());

: `${TMDB_URL}/${type}/${path}`;
const response = await fetch(url, {
const response = await fetchImpl(url, {
headers: this.headers,

@@ -158,3 +160,3 @@ }).then((r) => r.json());

async getMediaCredits(id, type) {
const { cast, crew } = await fetch(`${TMDB_URL}/${type}/${id}/${CREDITS}`, {
const { cast, crew } = await fetchImpl(`${TMDB_URL}/${type}/${id}/${CREDITS}`, {
headers: this.headers,

@@ -174,3 +176,3 @@ }).then((r) => r.json());

async getWatchProviders(id, type, locale = 'US') {
const { results } = await fetch(`${TMDB_URL}/${type}/${id}/${WATCH_PROVIDERS}`, {
const { results } = await fetchImpl(`${TMDB_URL}/${type}/${id}/${WATCH_PROVIDERS}`, {
headers: this.headers,

@@ -177,0 +179,0 @@ }).then((r) => r.json());

{
"name": "@charliehess/tmdb",
"version": "1.5.3",
"version": "1.6.0",
"description": "Helpers for TheMovieDB",

@@ -30,3 +30,4 @@ "main": "dist/index.js",

"date-fns": "^2.16.1",
"lodash": "^4.17.19"
"lodash": "^4.17.19",
"node-fetch": "^2.6.1"
},

@@ -33,0 +34,0 @@ "devDependencies": {

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