Fixed language options on all supported entrypoints

This commit is contained in:
Jérémy VIGNELLES
2023-10-06 17:09:45 +02:00
parent 1628ea05bd
commit 8c615edbfa
10 changed files with 171 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
import { TrendingMediaType, TimeWindow, TrendingResults } from '../types';
import { TrendingMediaType, TimeWindow, TrendingResults, LanguageOption } from '../types';
import { BaseEndpoint } from './base';
export class TrendingEndpoint extends BaseEndpoint {
@@ -8,10 +8,12 @@ export class TrendingEndpoint extends BaseEndpoint {
async trending<T extends TrendingMediaType>(
mediaType: T,
timeWindow: TimeWindow
timeWindow: TimeWindow,
options?: LanguageOption
): Promise<TrendingResults<T>> {
return await this.api.get<TrendingResults<T>>(
`/trending/${mediaType}/${timeWindow}`
`/trending/${mediaType}/${timeWindow}`,
options
);
}
}