Skip to content

Commit

Permalink
feat(TMDB): Trending API (#445)
Browse files Browse the repository at this point in the history
* feat(tmdb): Trending API

* feat(tmdb): Tests for trending

* docs(tmdb): Fetch trending docs
  • Loading branch information
EhsanFox authored Jan 6, 2024
1 parent 9c6e894 commit 4af480a
Show file tree
Hide file tree
Showing 10 changed files with 257 additions and 3 deletions.
11 changes: 10 additions & 1 deletion dist/models/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ export interface ISource {
export declare enum TvType {
TVSERIES = "TV Series",
MOVIE = "Movie",
ANIME = "Anime"
ANIME = "Anime",
PEOPLE = "People"
}
export interface IMovieEpisode {
id: string;
Expand All @@ -334,6 +335,14 @@ export interface IMovieResult {
type?: TvType;
[x: string]: unknown;
}
export interface IPeopleResult {
id: string;
name: string;
rating?: string;
image?: string;
movies: IMovieResult[];
[x: string]: unknown;
}
export interface INewsFeed extends INews {
/** topics of the feed */
topics: Topics[];
Expand Down
1 change: 1 addition & 0 deletions dist/models/types.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/models/types.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/providers/meta/tmdb.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ISearch, IAnimeInfo, IAnimeResult, ISource, IEpisodeServer, MovieParser, TvType, IMovieResult, IMovieInfo, ProxyConfig } from '../../models';
import { IPeopleResult } from '../../models/types';
import { AxiosAdapter } from 'axios';
declare class TMDB extends MovieParser {
private apiKey;
Expand All @@ -10,6 +11,12 @@ declare class TMDB extends MovieParser {
supportedTypes: Set<TvType>;
private provider;
constructor(apiKey?: string, provider?: MovieParser, proxyConfig?: ProxyConfig, adapter?: AxiosAdapter);
/**
* @param type trending type: tv series, movie, people or all
* @param timePeriod trending time period day or week
* @param page page number
*/
fetchTrending: (type: string | 'all', timePeriod?: 'day' | 'week', page?: number) => Promise<ISearch<IMovieResult | IAnimeResult | IPeopleResult>>;
/**
* @param query search query
* @param page page number
Expand Down
68 changes: 68 additions & 0 deletions dist/providers/meta/tmdb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4af480a

Please sign in to comment.