Merge branch 'master' into feature/append-result

This commit is contained in:
DerPenz
2023-04-27 11:31:07 +02:00
committed by GitHub
10 changed files with 217 additions and 126 deletions

View File

@@ -3,7 +3,7 @@ import { parseOptions } from './utils';
const BASE_URL_V3 = 'https://api.themoviedb.org/3';
export default class Api {
export class Api {
constructor(private accessToken: string) {
this.accessToken = accessToken;
}

View File

@@ -1,4 +1,4 @@
import Api from '../api';
import { Api } from '../api';
export class BaseEndpoint {
protected api: Api;

View File

@@ -1,6 +1,6 @@
import TMDB from './tmdb';
import { TMDB } from './tmdb';
export * from './types';
export * from './utils';
export default TMDB;
export { TMDB };

View File

@@ -17,7 +17,7 @@ import {
CollectionsEndpoint,
} from './endpoints';
export default class TMDB {
export class TMDB {
private readonly accessToken: string;
constructor(accessToken: string) {

View File

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