update dependencies

This commit is contained in:
Blake Joynes
2024-06-09 11:25:19 -04:00
parent fc44bcf425
commit 730afebd7d
9 changed files with 921 additions and 3032 deletions

View File

@@ -1,8 +1,7 @@
import fetch from 'cross-fetch';
import { parseOptions } from './utils';
import { ErrorResponse } from './types';
const BASE_URL_V3 = 'https://api.themoviedb.org/3';
import { BASE_URL_V3 } from './common/constants';
export class Api {
constructor(private accessToken: string) {

1
src/common/constants.ts Normal file
View File

@@ -0,0 +1 @@
export const BASE_URL_V3 = 'https://api.themoviedb.org/3';

View File

@@ -1,4 +1,3 @@
export function parseOptions(options?: Record<string, any>): string {
/* eslint-disable @typescript-eslint/no-explicit-any */
return options ? new URLSearchParams(Object.entries(options)).toString() : '';
}