tmdb-ts 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,4 +14,5 @@ export * from './trending';
14
14
  export * from './find';
15
15
  export * from './keywords';
16
16
  export * from './collections';
17
+ export * from './tv-seasons';
17
18
  export * from './tv-episode';
@@ -30,5 +30,6 @@ __exportStar(require("./trending"), exports);
30
30
  __exportStar(require("./find"), exports);
31
31
  __exportStar(require("./keywords"), exports);
32
32
  __exportStar(require("./collections"), exports);
33
+ __exportStar(require("./tv-seasons"), exports);
33
34
  __exportStar(require("./tv-episode"), exports);
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,+CAA6B"}
@@ -0,0 +1,13 @@
1
+ import { ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, TvSeasonChangeValue, SeasonDetails, SeasonSelection, Translations, Videos, AppendToResponseTvSeasonKey, AppendToResponse } from '..';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class TvSeasonsEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ details<T extends AppendToResponseTvSeasonKey[] | undefined>(seasonSelection: SeasonSelection, appendToResponse?: T, options?: LanguageOption): Promise<AppendToResponse<SeasonDetails, T, "tvSeason">>;
6
+ aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>;
7
+ changes(seasonId: number, options?: ChangeOption): Promise<Changes<TvSeasonChangeValue>>;
8
+ credits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>;
9
+ externalIds(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<ExternalIds>;
10
+ images(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Images>;
11
+ videos(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Videos>;
12
+ translations(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Translations>;
13
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TvSeasonsEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ const BASE_SEASON = (seasonSelection) => {
6
+ return `/tv/${seasonSelection.tvShowID}/season/${seasonSelection.seasonNumber}`;
7
+ };
8
+ class TvSeasonsEndpoint extends base_1.BaseEndpoint {
9
+ constructor(accessToken) {
10
+ super(accessToken);
11
+ }
12
+ async details(seasonSelection, appendToResponse, options) {
13
+ const combinedOptions = {
14
+ append_to_response: appendToResponse
15
+ ? appendToResponse.join(',')
16
+ : undefined,
17
+ ...options,
18
+ };
19
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}`, combinedOptions);
20
+ }
21
+ async aggregateCredits(seasonSelection, options) {
22
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/aggregate_credits`, options);
23
+ }
24
+ async changes(seasonId, options) {
25
+ return await this.api.get(`/tv/season/${seasonId}/changes`, options);
26
+ }
27
+ async credits(seasonSelection, options) {
28
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/credits`, options);
29
+ }
30
+ async externalIds(seasonSelection, options) {
31
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/external_ids`, options);
32
+ }
33
+ async images(seasonSelection, options) {
34
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/images`, options);
35
+ }
36
+ async videos(seasonSelection, options) {
37
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/videos`, options);
38
+ }
39
+ async translations(seasonSelection, options) {
40
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/translations`, options);
41
+ }
42
+ }
43
+ exports.TvSeasonsEndpoint = TvSeasonsEndpoint;
44
+ //# sourceMappingURL=tv-seasons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv-seasons.js","sourceRoot":"","sources":["../../src/endpoints/tv-seasons.ts"],"names":[],"mappings":";;;AAeA,iCAAsC;AAEtC,MAAM,WAAW,GAAG,CAAC,eAAgC,EAAU,EAAE;IAC/D,OAAO,OAAO,eAAe,CAAC,QAAQ,WAAW,eAAe,CAAC,YAAY,EAAE,CAAC;AAClF,CAAC,CAAC;AAEF,MAAa,iBAAkB,SAAQ,mBAAY;IACjD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CACX,eAAgC,EAChC,gBAAoB,EACpB,OAAwB;QAExB,MAAM,eAAe,GAAG;YACtB,kBAAkB,EAAE,gBAAgB;gBAClC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;gBAC5B,CAAC,CAAC,SAAS;YACb,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,EAAE,EACjC,eAAe,CAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB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1,4 +1,4 @@
1
- import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvEpisodesEndpoint } from './endpoints';
1
+ import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint } from './endpoints';
2
2
  export declare class TMDB {
3
3
  private readonly accessToken;
4
4
  constructor(accessToken: string);
@@ -19,4 +19,5 @@ export declare class TMDB {
19
19
  get find(): FindEndpoint;
20
20
  get keywords(): KeywordsEndpoint;
21
21
  get collections(): CollectionsEndpoint;
22
+ get tvSeasons(): TvSeasonsEndpoint;
22
23
  }
package/dist/tmdb.js CHANGED
@@ -58,6 +58,9 @@ class TMDB {
58
58
  get collections() {
59
59
  return new endpoints_1.CollectionsEndpoint(this.accessToken);
60
60
  }
61
+ get tvSeasons() {
62
+ return new endpoints_1.TvSeasonsEndpoint(this.accessToken);
63
+ }
61
64
  }
62
65
  exports.TMDB = TMDB;
63
66
  //# sourceMappingURL=tmdb.js.map
package/dist/tmdb.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tmdb.js","sourceRoot":"","sources":["../src/tmdb.ts"],"names":[],"mappings":";;;AAAA,2CAkBqB;AAErB,MAAa,IAAI;IACE,WAAW,CAAS;IAErC,YAAY,WAAmB;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,2BAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;I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AW,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,8BAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,wBAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,+BAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,6BAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;CACF;AA9ED,oBA8EC"}
@@ -15,6 +15,7 @@ export * from './find';
15
15
  export * from './keywords';
16
16
  export * from './collections';
17
17
  export * from './tv-episode';
18
+ export * from './tv-seasons';
18
19
  export type MediaType = 'movie' | 'tv' | 'person';
19
20
  export interface AuthorDetails {
20
21
  name: string;
@@ -31,4 +31,5 @@ __exportStar(require("./find"), exports);
31
31
  __exportStar(require("./keywords"), exports);
32
32
  __exportStar(require("./collections"), exports);
33
33
  __exportStar(require("./tv-episode"), exports);
34
+ __exportStar(require("./tv-seasons"), exports);
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,+CAA6B"}
@@ -1,4 +1,4 @@
1
- import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations } from '.';
1
+ import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue } from '.';
2
2
  export interface LanguageOption {
3
3
  language?: string;
4
4
  }
@@ -16,8 +16,9 @@ export type AppendToResponseMovieKey = 'images' | 'videos' | 'credits' | 'recomm
16
16
  export type AppendToResponseTvKey = 'content_ratings' | 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'aggregate_credits' | 'episode_groups' | 'screened_theatrically' | 'keywords';
17
17
  export type AppendToResponsePersonKey = 'images' | 'changes' | 'movie_credits' | 'tv_credits' | 'combined_credits' | 'external_ids' | 'tagged_images' | 'translations';
18
18
  export type AppendToResponseTvEpisodeKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'translations';
19
- type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponsePersonKey;
20
- export type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person' | 'tvEpisode';
19
+ export type AppendToResponseTvSeasonKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'aggregate_credits' | 'translations';
20
+ type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponseTvSeasonKey | AppendToResponsePersonKey;
21
+ export type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person' | 'tvSeason' | 'tvEpisode';
21
22
  export type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined, Media extends AppendToResponseMediaType> = K & (T extends undefined ? object : T extends Array<unknown> ? ('credits' extends T[number] ? {
22
23
  credits: Media extends 'tvEpisode' ? TvEpisodeCredit : Omit<Credits, 'id'>;
23
24
  } : object) & ('videos' extends T[number] ? {
@@ -31,7 +32,7 @@ export type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined,
31
32
  } : object) & ('reviews' extends T[number] ? {
32
33
  reviews: Omit<Translations, 'id'>;
33
34
  } : object) & ('changes' extends T[number] ? {
34
- changes: Changes<Media extends 'person' ? PersonChangeValue : Media extends 'movie' ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue : TvEpisodeChangeValue>;
35
+ changes: Changes<Media extends 'person' ? PersonChangeValue : Media extends 'movie' ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue : Media extends 'tvSeason' ? TvSeasonChangeValue : TvEpisodeChangeValue>;
35
36
  } : object) & ('keywords' extends T[number] ? {
36
37
  keywords: Omit<Keywords, 'id'>;
37
38
  } : object) & ('lists' extends T[number] ? {
@@ -0,0 +1,18 @@
1
+ import { Episode } from '.';
2
+ export interface SeasonSelection {
3
+ tvShowID: number;
4
+ seasonNumber: number;
5
+ }
6
+ export interface SeasonDetails {
7
+ air_date: string;
8
+ episodes: Episode[];
9
+ name: string;
10
+ overview: string;
11
+ id: number;
12
+ poster_path: string | null;
13
+ season_number: number;
14
+ }
15
+ export type TvSeasonChangeValue = string | {
16
+ episode_id: number;
17
+ episode_number: number;
18
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tv-seasons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv-seasons.js","sourceRoot":"","sources":["../../src/types/tv-seasons.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Episode } from './';
1
+ import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
2
2
  export interface CreatedBy {
3
3
  id: number;
4
4
  credit_id: string;
@@ -80,15 +80,6 @@ export interface TvShowDetails {
80
80
  vote_average: number;
81
81
  vote_count: number;
82
82
  }
83
- export interface SeasonDetails {
84
- air_date: string;
85
- episodes: Episode[];
86
- name: string;
87
- overview: string;
88
- id: number;
89
- poster_path: string | null;
90
- season_number: number;
91
- }
92
83
  export interface Network {
93
84
  id: number;
94
85
  logo_path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmdb-ts",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "TMDB v3 library wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",