Comparing version 1.4.0 to 1.5.1
@@ -1,2 +0,2 @@ | ||
import { ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, TvSeasonChangeValue, SeasonDetails, SeasonSelection, Translations, Videos, AppendToResponseTvSeasonKey, AppendToResponse } from '..'; | ||
import { ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, TvSeasonChangeValue, SeasonDetails, SeasonSelection, Translations, Videos, AppendToResponseTvSeasonKey, AppendToResponse, AggregateCredits } from '..'; | ||
import { BaseEndpoint } from './base'; | ||
@@ -6,3 +6,3 @@ export declare class TvSeasonsEndpoint extends BaseEndpoint { | ||
details<T extends AppendToResponseTvSeasonKey[] | undefined>(seasonSelection: SeasonSelection, appendToResponse?: T, options?: LanguageOption): Promise<AppendToResponse<SeasonDetails, T, "tvSeason">>; | ||
aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>; | ||
aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<AggregateCredits>; | ||
changes(seasonId: number, options?: ChangeOption): Promise<Changes<TvSeasonChangeValue>>; | ||
@@ -9,0 +9,0 @@ credits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>; |
import { BaseEndpoint } from './base'; | ||
import { AlternativeTitles, AppendToResponse, AppendToResponseTvKey, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, LatestTvShows, OnTheAir, PageOption, PopularTvShows, Recommendations, RegionOption, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChangeValue, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types'; | ||
import { AggregateCredits, AlternativeTitles, AppendToResponse, AppendToResponseTvKey, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, LatestTvShows, OnTheAir, PageOption, PopularTvShows, Recommendations, RegionOption, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChangeValue, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types'; | ||
export declare class TvShowsEndpoint extends BaseEndpoint { | ||
@@ -10,2 +10,3 @@ protected readonly accessToken: string; | ||
contentRatings(id: number): Promise<ContentRatings>; | ||
aggregateCredits(id: number): Promise<AggregateCredits>; | ||
credits(id: number): Promise<Credits>; | ||
@@ -12,0 +13,0 @@ season(tvId: number, seasonNumber: number): Promise<SeasonDetails>; |
@@ -29,2 +29,5 @@ "use strict"; | ||
} | ||
async aggregateCredits(id) { | ||
return await this.api.get(`${BASE_TV}/${id}/aggregate_credits`); | ||
} | ||
async credits(id) { | ||
@@ -31,0 +34,0 @@ return await this.api.get(`${BASE_TV}/${id}/credits`); |
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint } from './endpoints'; | ||
import { CompaniesEndpoint } from './endpoints/companies'; | ||
import { NetworksEndpoint } from './endpoints/networks'; | ||
export declare class TMDB { | ||
@@ -10,2 +12,4 @@ private readonly accessToken; | ||
get credits(): CreditsEndpoint; | ||
get companies(): CompaniesEndpoint; | ||
get networks(): NetworksEndpoint; | ||
get search(): SearchEndpoint; | ||
@@ -12,0 +16,0 @@ get genres(): GenreEndpoint; |
@@ -5,2 +5,4 @@ "use strict"; | ||
const endpoints_1 = require("./endpoints"); | ||
const companies_1 = require("./endpoints/companies"); | ||
const networks_1 = require("./endpoints/networks"); | ||
class TMDB { | ||
@@ -26,2 +28,8 @@ accessToken; | ||
} | ||
get companies() { | ||
return new companies_1.CompaniesEndpoint(this.accessToken); | ||
} | ||
get networks() { | ||
return new networks_1.NetworksEndpoint(this.accessToken); | ||
} | ||
get search() { | ||
@@ -28,0 +36,0 @@ return new endpoints_1.SearchEndpoint(this.accessToken); |
@@ -94,1 +94,42 @@ import { Image, Person } from './'; | ||
} | ||
export interface AggregateCredits { | ||
id: number; | ||
cast: AggregateCast[]; | ||
crew: AggregateCrew[]; | ||
} | ||
export interface CastRole { | ||
credit_id: string; | ||
character: string; | ||
episode_count: number; | ||
} | ||
export interface AggregateCast { | ||
adult: boolean; | ||
gender: number; | ||
id: number; | ||
known_for_department: string; | ||
name: string; | ||
original_name: string; | ||
popularity: number; | ||
profile_path: string; | ||
roles: CastRole[]; | ||
total_episode_count: number; | ||
order: number; | ||
} | ||
export interface CrewJob { | ||
credit_id: string; | ||
job: string; | ||
episode_count: number; | ||
} | ||
export interface AggregateCrew { | ||
adult: boolean; | ||
gender: number; | ||
id: number; | ||
known_for_department: string; | ||
name: string; | ||
original_name: string; | ||
popularity: number; | ||
profile_path: string; | ||
jobs: CrewJob[]; | ||
department: string; | ||
total_episode_count: number; | ||
} |
export * from './options'; | ||
export * from './certification'; | ||
export * from './credits'; | ||
export * from './companies'; | ||
export * from './networks'; | ||
export * from './configuration'; | ||
@@ -5,0 +7,0 @@ export * from './changes'; |
@@ -20,2 +20,4 @@ "use strict"; | ||
__exportStar(require("./credits"), exports); | ||
__exportStar(require("./companies"), exports); | ||
__exportStar(require("./networks"), exports); | ||
__exportStar(require("./configuration"), exports); | ||
@@ -22,0 +24,0 @@ __exportStar(require("./changes"), exports); |
{ | ||
"name": "tmdb-ts", | ||
"version": "1.4.0", | ||
"version": "1.5.1", | ||
"description": "TMDB v3 library wrapper", | ||
@@ -8,8 +8,7 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"compile": "rm -rf dist && tsc -d && npm run copy-types", | ||
"compile": "rm -rf dist && tsc -d", | ||
"lint": "eslint --ext .ts src/", | ||
"lint:fix": "eslint --ext .ts src/ --fix", | ||
"format": "npx prettier --write src", | ||
"pre-commit": "npm run lint", | ||
"copy-types": "mkdir dist/types && cp src/types/*.d.ts dist/types" | ||
"pre-commit": "npm run lint" | ||
}, | ||
@@ -16,0 +15,0 @@ "bugs": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120717
153
2837