🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

tmdb-api-js

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmdb-api-js - npm Package Compare versions

Comparing version

to
0.0.2

5

dist/index.d.ts

@@ -9,3 +9,3 @@ // Generated by dts-bundle-generator v9.5.1

export interface TvClient extends ClientInterface {
getShowDetails: (showId: number) => Promise<any>;
getTVDetails: (showId: number) => Promise<any>;
}

@@ -20,6 +20,7 @@ export interface TMDBClientInterface {

constructor(apiKey: string, baseUrl?: string, language?: string);
get<T>(path: string): Promise<any>;
}
declare class TvClient$1 extends Client implements TvClient {
constructor(apiKey: string, baseUrl?: string, language?: string);
getShowDetails(showId: number): Promise<any>;
getTVDetails(showId: number): Promise<any>;
}

@@ -26,0 +27,0 @@ declare class TMDBClient extends Client implements TMDBClientInterface {

19

dist/index.js

@@ -15,2 +15,11 @@ // src/constants.ts

}
async get(path) {
const response = await fetch(`${this.baseUrl}/${path}?language=${this.language}`, {
headers: {
Authorization: `Bearer ${this.apiKey}`,
"Content-Type": "application/json"
}
});
return response.json();
}
}

@@ -24,10 +33,4 @@ var client_default = Client;

}
async getShowDetails(showId) {
const response = await fetch(`${this.baseUrl}/tv/${showId}?language=${this.language}`, {
headers: {
Authorization: `Bearer ${this.apiKey}`,
"Content-Type": "application/json;charset=utf-8"
}
});
return response.json();
async getTVDetails(showId) {
return this.get(`tv/${showId}`);
}

@@ -34,0 +37,0 @@ }

{
"name": "tmdb-api-js",
"type": "module",
"version": "0.0.1",
"version": "0.0.2",
"main": "./dist/index.cjs",

@@ -6,0 +6,0 @@ "module": "./dist/index.js",

Sorry, the diff of this file is not supported yet