update dependencies
This commit is contained in:
@@ -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
1
src/common/constants.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const BASE_URL_V3 = 'https://api.themoviedb.org/3';
|
||||
@@ -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() : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user