added Collection endpoint and types, buildable option interfaces

This commit is contained in:
DerPenz
2023-02-27 16:14:07 +01:00
parent 69e50d0eb9
commit 772b974ae2
5 changed files with 45 additions and 7 deletions

16
src/types/collections.ts Normal file
View File

@@ -0,0 +1,16 @@
import { Movie } from ".";
export interface Collection {
id: number;
backdrop_path: string;
name: string;
poster_path: string;
adult: boolean;
original_language: string;
original_name: string;
overview: string;
}
export interface DetailedCollection extends Collection {
parts: Movie[]
}

View File

@@ -1,3 +1,4 @@
export * from './options';
export * from './certification';
export * from './credits';
export * from './configuration';
@@ -12,6 +13,7 @@ export * from './review';
export * from './trending';
export * from './find';
export * from './keywords';
export * from './collections';
export interface AuthorDetails {
name: string;
@@ -49,13 +51,6 @@ export interface Person {
popularity: number;
}
export interface Collection {
id:number;
backdrop_path: string;
name: string;
poster_path: string;
}
export interface Movie {
id: number;
logo_path: string;

9
src/types/options.ts Normal file
View File

@@ -0,0 +1,9 @@
import { ParsedUrlQueryInput } from 'querystring';
export interface LanguageOption extends ParsedUrlQueryInput {
language?: string;
}
export interface PageOption extends ParsedUrlQueryInput {
page?: number;
}