@plotwist_app/tmdb
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -44,3 +44,3 @@ import { ListResponse } from './utils/list-response.js'; | ||
export { TvCast, TvCrew } from './models/tv-credits.js'; | ||
import { AxiosInstance } from 'axios'; | ||
import { AxiosInstance, CreateAxiosDefaults } from 'axios'; | ||
import './utils/with_media_type.js'; | ||
@@ -50,3 +50,3 @@ import './utils/common.js'; | ||
declare let axiosClient: AxiosInstance; | ||
declare function TMDB(accessToken: string): { | ||
declare function TMDB(accessToken: string, config: CreateAxiosDefaults): { | ||
collections: { | ||
@@ -53,0 +53,0 @@ details: (id: number, language: Language) => Promise<any>; |
@@ -378,3 +378,3 @@ "use strict"; | ||
var axiosClient; | ||
function TMDB(accessToken) { | ||
function TMDB(accessToken, config) { | ||
axiosClient = import_axios.default.create({ | ||
@@ -384,5 +384,5 @@ baseURL: "https://api.themoviedb.org/3", | ||
Authorization: `Bearer ${accessToken}` | ||
} | ||
}, | ||
...config | ||
}); | ||
axiosClient.defaults.timeout = 5e3; | ||
return { | ||
@@ -389,0 +389,0 @@ collections, |
{ | ||
"name": "@plotwist_app/tmdb", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
"dependencies": { | ||
"axios": "^1.6.5", | ||
"https": "^1.0.0", | ||
"tsup": "^8.3.5", | ||
@@ -8,0 +9,0 @@ "typescript": "^5.6.3" |
@@ -1,2 +0,2 @@ | ||
import axios, { type AxiosInstance } from 'axios' | ||
import axios, { type CreateAxiosDefaults, type AxiosInstance } from 'axios' | ||
import { | ||
@@ -20,3 +20,3 @@ collections, | ||
export function TMDB(accessToken: string) { | ||
export function TMDB(accessToken: string, config: CreateAxiosDefaults) { | ||
axiosClient = axios.create({ | ||
@@ -27,6 +27,5 @@ baseURL: 'https://api.themoviedb.org/3', | ||
}, | ||
...config, | ||
}) | ||
axiosClient.defaults.timeout = 5_000 | ||
return { | ||
@@ -33,0 +32,0 @@ collections, |
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
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
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
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
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
357013
4
+ Addedhttps@^1.0.0
+ Addedhttps@1.0.0(transitive)