Add season endpoint
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
Recommendations,
|
||||
Reviews,
|
||||
ScreenedTheatrically,
|
||||
SeasonDetails,
|
||||
SimilarTvShows,
|
||||
TopRatedTvShows,
|
||||
Translations,
|
||||
@@ -53,6 +54,9 @@ export class TvShowsEndpoint extends BaseEndpoint{
|
||||
return await this.api.get<Credits>(`${BASE_TV}/${id}/credits`);
|
||||
}
|
||||
|
||||
async season(tvId: number, seasonNumber: number): Promise<SeasonDetails>{
|
||||
return await this.api.get<SeasonDetails>(`${BASE_TV}/${tvId}/season/${seasonNumber}`);
|
||||
}
|
||||
|
||||
async episodeGroups(id: number): Promise<EpisodeGroups>{
|
||||
return await this.api.get<EpisodeGroups>(`${BASE_TV}/${id}/episode_groups`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
|
||||
import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Crew } from './';
|
||||
|
||||
export interface CreatedBy {
|
||||
id: number;
|
||||
@@ -72,6 +72,46 @@ export interface TvShowDetails {
|
||||
vote_count: number;
|
||||
}
|
||||
|
||||
export interface GuestStar {
|
||||
credit_id: string
|
||||
order: number
|
||||
character: string
|
||||
adult: boolean
|
||||
gender: number | null
|
||||
id: number
|
||||
known_for_department: string
|
||||
name: string
|
||||
original_name: string
|
||||
popularity: number
|
||||
profile_path: string | null
|
||||
|
||||
}
|
||||
|
||||
export interface Episode {
|
||||
air_date: string
|
||||
episode_number: number
|
||||
crew: Crew[]
|
||||
guest_stars: GuestStar[]
|
||||
id: number
|
||||
name: string
|
||||
overview: string
|
||||
production_code: string
|
||||
season_number: number
|
||||
still_path: string
|
||||
vote_average: number
|
||||
vote_count: number
|
||||
}
|
||||
|
||||
export interface SeasonDetails {
|
||||
air_date: string
|
||||
episodes: Episode[]
|
||||
name: string
|
||||
overview: string
|
||||
id: number
|
||||
poster_path: string | null
|
||||
season_number: number
|
||||
}
|
||||
|
||||
export interface TvShowItem {
|
||||
id: string;
|
||||
action: string;
|
||||
|
||||
Reference in New Issue
Block a user