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.4.0 to 1.4.1

6

dist/api.js

@@ -152,7 +152,7 @@ "use strict";

}
async getWatchProviders(id, type) {
const result = await fetch(`${TMDB_URL}/${type}/${id}/${WATCH_PROVIDERS}`, {
async getWatchProviders(id, type, locale = 'US') {
const { results } = await fetch(`${TMDB_URL}/${type}/${id}/${WATCH_PROVIDERS}`, {
headers: this.headers,
}).then((r) => r.json());
const providers = utils_1.processWatchProviders((result === null || result === void 0 ? void 0 : result.US) || {});
const providers = utils_1.processWatchProviders((results === null || results === void 0 ? void 0 : results[locale]) || {});
providers.forEach((provider) => (provider.logo_path = this.tmdbPathPrefix(provider.logo_path, 200)));

@@ -159,0 +159,0 @@ return providers;

@@ -122,8 +122,11 @@ export interface TMDb {

}
export declare type TMDbWatchProviderResult = Record<string, {
link?: string;
buy?: Array<TMDbWatchProvider>;
rent?: Array<TMDbWatchProvider>;
flatrate?: Array<TMDbWatchProvider>;
}>;
export interface TMDbWatchProviderResult {
id: number;
results: Record<string, {
link?: string;
buy?: Array<TMDbWatchProvider>;
rent?: Array<TMDbWatchProvider>;
flatrate?: Array<TMDbWatchProvider>;
}>;
}
export interface TMDbWatchProvider {

@@ -130,0 +133,0 @@ display_priority: number;

@@ -24,3 +24,3 @@ import { TMDbCrewMember, TMDbMovie, TMDbTvShow, TMDbWatchProvider, TMDbWatchProviderResult } from './interfaces';

export declare function processCrewMembers(crew: Array<TMDbCrewMember>): Array<TMDbCrewMember>;
export declare function processWatchProviders({ buy, rent, flatrate, }: TMDbWatchProviderResult['US']): Array<TMDbWatchProvider>;
export declare function processWatchProviders({ buy, rent, flatrate, }: TMDbWatchProviderResult['results']['US']): Array<TMDbWatchProvider>;
export declare function formattedFutureDate(duration: Duration, pattern?: string): string;
{
"name": "@charliehess/tmdb",
"version": "1.4.0",
"version": "1.4.1",
"description": "Helpers for TheMovieDB",

@@ -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

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