Files
tmdb-ts/src/endpoints/trending.ts
Tobias Karlsson 9a25d3bcf9 Formatting with eslint
Should probably be configured to run for every commit in the future
2023-04-13 09:05:44 +02:00

15 lines
434 B
TypeScript

import { MediaType, TimeWindow, TrendingResults } from '../types';
import { BaseEndpoint } from './base';
export class TrendingEndpoint extends BaseEndpoint {
constructor(accessToken: string) {
super(accessToken);
}
async trending<T extends MediaType>(mediaType : T, timeWindow: TimeWindow): Promise<TrendingResults<T>> {
return await this.api.get<TrendingResults<T>>(`/trending/${mediaType}/${timeWindow}`);
}
}