Added languages options for genres

This commit is contained in:
Jérémy VIGNELLES
2023-10-23 16:51:47 +02:00
parent eb53747570
commit 7d4b3fcb60

View File

@@ -1,3 +1,4 @@
import { LanguageOption } from '../types';
import { BaseEndpoint } from './base';
export interface Genres {
@@ -9,11 +10,11 @@ export class GenreEndpoint extends BaseEndpoint {
super(accessToken);
}
async movies(): Promise<Genres> {
return await this.api.get<Genres>('/genre/movie/list');
async movies(options?: LanguageOption): Promise<Genres> {
return await this.api.get<Genres>('/genre/movie/list', options);
}
async tvShows(): Promise<Genres> {
return await this.api.get<Genres>('/genre/tv/list');
async tvShows(options?: LanguageOption): Promise<Genres> {
return await this.api.get<Genres>('/genre/tv/list', options);
}
}