tmdb-ts 1.8.0 → 2.0.1

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.
Files changed (61) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/api.js +3 -2
  3. package/dist/api.js.map +1 -1
  4. package/dist/common/constants.d.ts +1 -0
  5. package/dist/common/constants.js +5 -0
  6. package/dist/common/constants.js.map +1 -0
  7. package/dist/endpoints/changes.js +1 -1
  8. package/dist/endpoints/changes.js.map +1 -1
  9. package/dist/endpoints/collections.d.ts +2 -2
  10. package/dist/endpoints/configuration.d.ts +7 -2
  11. package/dist/endpoints/configuration.js +16 -1
  12. package/dist/endpoints/configuration.js.map +1 -1
  13. package/dist/endpoints/discover.d.ts +1 -55
  14. package/dist/endpoints/discover.js.map +1 -1
  15. package/dist/endpoints/find.d.ts +1 -1
  16. package/dist/endpoints/find.js +2 -2
  17. package/dist/endpoints/find.js.map +1 -1
  18. package/dist/endpoints/index.d.ts +1 -0
  19. package/dist/endpoints/index.js +1 -0
  20. package/dist/endpoints/index.js.map +1 -1
  21. package/dist/endpoints/keywords.d.ts +4 -0
  22. package/dist/endpoints/keywords.js +4 -0
  23. package/dist/endpoints/keywords.js.map +1 -1
  24. package/dist/endpoints/people.d.ts +5 -2
  25. package/dist/endpoints/people.js +3 -0
  26. package/dist/endpoints/people.js.map +1 -1
  27. package/dist/endpoints/watch-providers.d.ts +11 -0
  28. package/dist/endpoints/watch-providers.js +22 -0
  29. package/dist/endpoints/watch-providers.js.map +1 -0
  30. package/dist/tmdb.d.ts +2 -1
  31. package/dist/tmdb.js +3 -0
  32. package/dist/tmdb.js.map +1 -1
  33. package/dist/types/account.d.ts +2 -1
  34. package/dist/types/certification.d.ts +47 -5
  35. package/dist/types/changes.d.ts +1 -1
  36. package/dist/types/collections.d.ts +3 -6
  37. package/dist/types/companies.d.ts +1 -1
  38. package/dist/types/configuration.d.ts +132 -88
  39. package/dist/types/configuration.js +111 -99
  40. package/dist/types/configuration.js.map +1 -1
  41. package/dist/types/credits.d.ts +6 -4
  42. package/dist/types/discover.d.ts +56 -1
  43. package/dist/types/index.d.ts +16 -5
  44. package/dist/types/index.js +66 -0
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/types/movies.d.ts +4 -3
  47. package/dist/types/movies.js +1 -1
  48. package/dist/types/movies.js.map +1 -1
  49. package/dist/types/options.d.ts +9 -4
  50. package/dist/types/options.js +140 -0
  51. package/dist/types/options.js.map +1 -1
  52. package/dist/types/people.d.ts +3 -3
  53. package/dist/types/regions.d.ts +6 -0
  54. package/dist/types/regions.js +3 -0
  55. package/dist/types/regions.js.map +1 -0
  56. package/dist/types/tv-episode.d.ts +2 -2
  57. package/dist/types/watch-providers.d.ts +17 -0
  58. package/dist/utils/getImagePath.js.map +1 -1
  59. package/dist/utils/parseOptions.js +5 -2
  60. package/dist/utils/parseOptions.js.map +1 -1
  61. package/package.json +18 -23
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Blake Joynes
3
+ Copyright (c) 2024 Blake Joynes
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/api.js CHANGED
@@ -6,16 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Api = void 0;
7
7
  const cross_fetch_1 = __importDefault(require("cross-fetch"));
8
8
  const utils_1 = require("./utils");
9
- const BASE_URL_V3 = 'https://api.themoviedb.org/3';
9
+ const constants_1 = require("./common/constants");
10
10
  class Api {
11
11
  accessToken;
12
12
  constructor(accessToken) {
13
13
  this.accessToken = accessToken;
14
14
  this.accessToken = accessToken;
15
15
  }
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
17
  async get(path, options) {
17
18
  const params = (0, utils_1.parseOptions)(options);
18
- const response = await (0, cross_fetch_1.default)(`${BASE_URL_V3}${path}?${params}`, {
19
+ const response = await (0, cross_fetch_1.default)(`${constants_1.BASE_URL_V3}${path}?${params}`, {
19
20
  method: 'GET',
20
21
  headers: {
21
22
  Authorization: `Bearer ${this.accessToken}`,
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAChC,mCAAuC;AAGvC,MAAM,WAAW,GAAG,8BAA8B,CAAC;AAEnD,MAAa,GAAG;IACM;IAApB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,GAAG,CAAI,IAAY,EAAE,OAA6B;QACtD,MAAM,MAAM,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAK,EAAC,GAAG,WAAW,GAAG,IAAI,IAAI,MAAM,EAAE,EAAE;YAC9D,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;gBAC3C,cAAc,EAAE,gCAAgC;aACjD;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YAChB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;SACjE;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM,CAAC;IACtC,CAAC;CACF;AArBD,kBAqBC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAChC,mCAAuC;AAEvC,kDAAiD;AAEjD,MAAa,GAAG;IACM;IAApB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,GAAG,CAAI,IAAY,EAAE,OAA6B;QACtD,MAAM,MAAM,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAK,EAAC,GAAG,uBAAW,GAAG,IAAI,IAAI,MAAM,EAAE,EAAE;YAC9D,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;gBAC3C,cAAc,EAAE,gCAAgC;aACjD;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM,CAAC;IACtC,CAAC;CACF;AAtBD,kBAsBC"}
@@ -0,0 +1 @@
1
+ export declare const BASE_URL_V3 = "https://api.themoviedb.org/3";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_URL_V3 = void 0;
4
+ exports.BASE_URL_V3 = 'https://api.themoviedb.org/3';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,8BAA8B,CAAC"}
@@ -15,7 +15,7 @@ class ChangeEndpoint extends base_1.BaseEndpoint {
15
15
  return await this.api.get(`/tv/changes`, options);
16
16
  }
17
17
  async person(options) {
18
- return await this.api.get(`/person/change`, options);
18
+ return await this.api.get(`/person/changes`, options);
19
19
  }
20
20
  }
21
21
  exports.ChangeEndpoint = ChangeEndpoint;
@@ -1 +1 @@
1
- {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../src/endpoints/changes.ts"],"names":[],"mappings":";;;AACA,iCAAsC;AAEtC,MAAa,cAAe,SAAQ,mBAAY;IACf;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAsB;QAClC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,aAAa,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAhBD,wCAgBC"}
1
+ {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../src/endpoints/changes.ts"],"names":[],"mappings":";;;AACA,iCAAsC;AAEtC,MAAa,cAAe,SAAQ,mBAAY;IACf;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAsB;QAClC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,aAAa,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF;AAhBD,wCAgBC"}
@@ -1,9 +1,9 @@
1
- import { CollectionImageOptions, DetailedCollection, ImageCollection, LanguageOption, Translations } from '../types';
1
+ import { CollectionDetails, CollectionImageOptions, ImageCollection, LanguageOption, Translations } from '../types';
2
2
  import { BaseEndpoint } from './base';
3
3
  export declare class CollectionsEndpoint extends BaseEndpoint {
4
4
  protected readonly accessToken: string;
5
5
  constructor(accessToken: string);
6
- details(id: number, options?: LanguageOption): Promise<DetailedCollection>;
6
+ details(id: number, options?: LanguageOption): Promise<CollectionDetails>;
7
7
  images(id: number, options?: CollectionImageOptions): Promise<ImageCollection>;
8
8
  translations(id: number, options?: LanguageOption): Promise<Translations>;
9
9
  }
@@ -1,7 +1,12 @@
1
1
  import { BaseEndpoint } from './base';
2
- import { Configuration } from '../types/configuration';
2
+ import { Configuration, CountryConfiguration, JobConfiguration, LanguageConfiguration, TimezoneConfiguration } from '../types/configuration';
3
3
  export declare class ConfigurationEndpoint extends BaseEndpoint {
4
4
  protected readonly accessToken: string;
5
5
  constructor(accessToken: string);
6
- getCurrent(): Promise<Configuration>;
6
+ getApiConfiguration(): Promise<Configuration>;
7
+ getCountries(): Promise<CountryConfiguration[]>;
8
+ getLanguages(): Promise<LanguageConfiguration[]>;
9
+ getJobs(): Promise<JobConfiguration[]>;
10
+ getPrimaryTranslations(): Promise<string[]>;
11
+ getTimezones(): Promise<TimezoneConfiguration[]>;
7
12
  }
@@ -8,9 +8,24 @@ class ConfigurationEndpoint extends base_1.BaseEndpoint {
8
8
  super(accessToken);
9
9
  this.accessToken = accessToken;
10
10
  }
11
- async getCurrent() {
11
+ async getApiConfiguration() {
12
12
  return await this.api.get(`/configuration`);
13
13
  }
14
+ async getCountries() {
15
+ return await this.api.get(`/configuration/countries`);
16
+ }
17
+ async getLanguages() {
18
+ return await this.api.get(`/configuration/languages`);
19
+ }
20
+ async getJobs() {
21
+ return await this.api.get(`/configuration/jobs`);
22
+ }
23
+ async getPrimaryTranslations() {
24
+ return await this.api.get(`/configuration/primary_translations`);
25
+ }
26
+ async getTimezones() {
27
+ return await this.api.get(`/configuration/timezones`);
28
+ }
14
29
  }
15
30
  exports.ConfigurationEndpoint = ConfigurationEndpoint;
16
31
  //# sourceMappingURL=configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/endpoints/configuration.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAGtC,MAAa,qBAAsB,SAAQ,mBAAY;IACtB;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,gBAAgB,CAAC,CAAC;IAC7D,CAAC;CACF;AARD,sDAQC"}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/endpoints/configuration.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAStC,MAAa,qBAAsB,SAAQ,mBAAY;IACtB;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,gBAAgB,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,0BAA0B,CAC3B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,0BAA0B,CAC3B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAqB,qBAAqB,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,sBAAsB;QAC1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAW,qCAAqC,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF;AAlCD,sDAkCC"}
@@ -1,61 +1,7 @@
1
- import { MovieDiscoverResult, SortOption, TvShowDiscoverResult } from '../types';
1
+ import { MovieDiscoverResult, MovieQueryOptions, TvShowDiscoverResult, TvShowQueryOptions } from '../types';
2
2
  import { BaseEndpoint } from './base';
3
- interface DiscoverQueryOptions {
4
- language?: string;
5
- sort_by?: SortOption;
6
- page?: number;
7
- 'vote_average.gte'?: number;
8
- 'vote_count.gte'?: number;
9
- 'vote_count.lte'?: number;
10
- 'vote_average.lte'?: number;
11
- with_watch_providers?: string;
12
- watch_region?: string;
13
- without_companies?: string;
14
- with_watch_monetization_types?: 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
15
- 'with_runtime.gte'?: number;
16
- 'with_runtime.lte'?: number;
17
- with_genres?: string;
18
- without_genres?: string;
19
- with_original_language?: string;
20
- without_keywords?: string;
21
- with_keywords?: string;
22
- with_companies?: string;
23
- }
24
- interface MovieQueryOptions extends DiscoverQueryOptions {
25
- region?: string;
26
- certification_country?: string;
27
- certification?: string;
28
- 'certification.lte'?: string;
29
- 'certification.gte'?: string;
30
- include_adult?: boolean;
31
- include_video?: boolean;
32
- primary_release_year?: number;
33
- 'primary_release_date.gte'?: string;
34
- 'primary_release_date.lte'?: string;
35
- 'release_date.gte'?: string;
36
- 'release_date.lte'?: string;
37
- with_release_type?: string;
38
- year?: number;
39
- with_cast?: string;
40
- with_crew?: string;
41
- with_people?: string;
42
- }
43
- interface TvShowQueryOptions extends DiscoverQueryOptions {
44
- 'air_date.gte'?: string;
45
- 'air_date.lte'?: string;
46
- 'first_air_date.gte'?: string;
47
- 'first_air_date.lte'?: string;
48
- first_air_date_year?: number;
49
- timezone?: string;
50
- with_networks?: string;
51
- include_null_first_air_dates?: boolean;
52
- screened_theatrically?: boolean;
53
- with_status?: string;
54
- with_type?: string;
55
- }
56
3
  export declare class DiscoverEndpoint extends BaseEndpoint {
57
4
  constructor(accessToken: string);
58
5
  movie(options?: MovieQueryOptions): Promise<MovieDiscoverResult>;
59
6
  tvShow(options?: TvShowQueryOptions): Promise<TvShowDiscoverResult>;
60
7
  }
61
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/endpoints/discover.ts"],"names":[],"mappings":";;;AAKA,iCAAsC;AAEtC,MAAM,aAAa,GAAG,WAAW,CAAC;AA0DlC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAA2B;QACrC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,aAAa,QAAQ,EACxB,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA4B;QACvC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,aAAa,KAAK,EACrB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAlBD,4CAkBC"}
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/endpoints/discover.ts"],"names":[],"mappings":";;;AAMA,iCAAsC;AAEtC,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAA2B;QACrC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,aAAa,QAAQ,EACxB,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA4B;QACvC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,aAAa,KAAK,EACrB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAlBD,4CAkBC"}
@@ -2,5 +2,5 @@ import { BaseEndpoint } from './base';
2
2
  import { ExternalIdOptions, FindResult } from '../types';
3
3
  export declare class FindEndpoint extends BaseEndpoint {
4
4
  constructor(accessToken: string);
5
- byId(externalId: string, options: ExternalIdOptions): Promise<FindResult>;
5
+ byExternalId(id: string, options: ExternalIdOptions): Promise<FindResult>;
6
6
  }
@@ -6,8 +6,8 @@ class FindEndpoint extends base_1.BaseEndpoint {
6
6
  constructor(accessToken) {
7
7
  super(accessToken);
8
8
  }
9
- async byId(externalId, options) {
10
- return await this.api.get(`/find/${externalId}`, options);
9
+ async byExternalId(id, options) {
10
+ return await this.api.get(`/find/${id}`, options);
11
11
  }
12
12
  }
13
13
  exports.FindEndpoint = FindEndpoint;
@@ -1 +1 @@
1
- {"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/endpoints/find.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAGtC,MAAa,YAAa,SAAQ,mBAAY;IAC5C,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,UAAkB,EAClB,OAA0B;QAE1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAa,SAAS,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAXD,oCAWC"}
1
+ {"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/endpoints/find.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAGtC,MAAa,YAAa,SAAQ,mBAAY;IAC5C,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,EAAU,EACV,OAA0B;QAE1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAa,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAXD,oCAWC"}
@@ -16,3 +16,4 @@ export * from './keywords';
16
16
  export * from './collections';
17
17
  export * from './tv-seasons';
18
18
  export * from './tv-episode';
19
+ export * from './watch-providers';
@@ -32,4 +32,5 @@ __exportStar(require("./keywords"), exports);
32
32
  __exportStar(require("./collections"), exports);
33
33
  __exportStar(require("./tv-seasons"), exports);
34
34
  __exportStar(require("./tv-episode"), exports);
35
+ __exportStar(require("./watch-providers"), exports);
35
36
  //# 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;AAC7B,+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;AAC7B,oDAAkC"}
@@ -3,5 +3,9 @@ import { BelongingMovies, Keyword, KeywordsOptions } from '../types';
3
3
  export declare class KeywordsEndpoint extends BaseEndpoint {
4
4
  constructor(accessToken: string);
5
5
  details(keywordId: number): Promise<Keyword>;
6
+ /**
7
+ *
8
+ * @deprecated
9
+ */
6
10
  belongingMovies(keywordId: number, options?: KeywordsOptions): Promise<BelongingMovies>;
7
11
  }
@@ -10,6 +10,10 @@ class KeywordsEndpoint extends base_1.BaseEndpoint {
10
10
  async details(keywordId) {
11
11
  return await this.api.get(`${BASE_Keyword}/${keywordId}`);
12
12
  }
13
+ /**
14
+ *
15
+ * @deprecated
16
+ */
13
17
  async belongingMovies(keywordId, options) {
14
18
  return await this.api.get(`${BASE_Keyword}/${keywordId}/movies`, options);
15
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAGtC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,SAAiB;QAC7B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAU,GAAG,YAAY,IAAI,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,SAAiB,EACjB,OAAyB;QAEzB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,YAAY,IAAI,SAAS,SAAS,EACrC,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAlBD,4CAkBC"}
1
+ {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAGtC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,SAAiB;QAC7B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAU,GAAG,YAAY,IAAI,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CACnB,SAAiB,EACjB,OAAyB;QAEzB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,YAAY,IAAI,SAAS,SAAS,EACrC,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAtBD,4CAsBC"}
@@ -1,4 +1,4 @@
1
- import { AppendToResponse, AppendToResponsePersonKey, ChangeOption, ExternalIds, PageOption, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTvShowCredit, PopularPersons, TaggedImages, Changes, PersonChangeValue, LanguageOption } from '../types';
1
+ import { AppendToResponse, AppendToResponsePersonKey, ChangeOption, ExternalIds, PageOption, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTvShowCredit, TaggedImages, Changes, PersonChangeValue, LanguageOption, PopularPeople } from '../types';
2
2
  import { BaseEndpoint } from './base';
3
3
  export declare class PeopleEndpoint extends BaseEndpoint {
4
4
  constructor(accessToken: string);
@@ -9,8 +9,11 @@ export declare class PeopleEndpoint extends BaseEndpoint {
9
9
  combinedCredits(id: number, options?: LanguageOption): Promise<PersonCombinedCredits>;
10
10
  externalId(id: number): Promise<ExternalIds>;
11
11
  images(id: number): Promise<PeopleImages>;
12
+ /**
13
+ * @deprecated
14
+ */
12
15
  taggedImages(id: number, options?: PageOption): Promise<TaggedImages>;
13
16
  translation(id: number): Promise<PersonTranslations>;
14
17
  latest(): Promise<PersonDetails>;
15
- popular(options?: LanguageOption & PageOption): Promise<PopularPersons>;
18
+ popular(options?: LanguageOption & PageOption): Promise<PopularPeople>;
16
19
  }
@@ -34,6 +34,9 @@ class PeopleEndpoint extends base_1.BaseEndpoint {
34
34
  async images(id) {
35
35
  return await this.api.get(`${BASE_PERSON}/${id}/images`);
36
36
  }
37
+ /**
38
+ * @deprecated
39
+ */
37
40
  async taggedImages(id, options) {
38
41
  return await this.api.get(`${BASE_PERSON}/${id}/tagged_images`, options);
39
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/endpoints/people.ts"],"names":[],"mappings":";;;AAkBA,iCAAsC;AAEtC,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAa,cAAe,SAAQ,mBAAY;IAC9C,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CACX,EAAU,EACV,gBAAoB,EACpB,QAAiB;QAEjB,MAAM,OAAO,GAAG;YACd,kBAAkB,EAAE,gBAAgB;gBAClC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;gBAC5B,CAAC,CAAC,SAAS;YACb,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,EAAE,EACtB,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CACX,EAAU,EACV,OAAsB;QAEtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,UAAU,EAC9B,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,EAAU,EACV,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,gBAAgB,EACpC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,EAAU,EACV,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,aAAa,EACjC,OAAO,CACR,CAAC;IACJ,CA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AAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,GAAG,WAAW,IAAI,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,OAAoB;QACjD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,gBAAgB,EACpC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,EAAU;QAC1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,IAAI,EAAE,eAAe,CACpC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,GAAG,WAAW,SAAS,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAqC;QACjD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,GAAG,WAAW,UAAU,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AA7FD,wCA6FC"}
@@ -0,0 +1,11 @@
1
+ import { BaseEndpoint } from './base';
2
+ import { LanguageOption, RegionResult, WatchProviderResult, WatchRegionOption } from '../types';
3
+ type ProviderOptions = WatchRegionOption & LanguageOption;
4
+ export declare class WatchProvidersEndpoint extends BaseEndpoint {
5
+ protected readonly accessToken: string;
6
+ constructor(accessToken: string);
7
+ getRegions(options?: LanguageOption): Promise<RegionResult>;
8
+ getMovieProviders(options?: ProviderOptions): Promise<WatchProviderResult>;
9
+ getTvProviders(options?: ProviderOptions): Promise<WatchProviderResult>;
10
+ }
11
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WatchProvidersEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ class WatchProvidersEndpoint extends base_1.BaseEndpoint {
6
+ accessToken;
7
+ constructor(accessToken) {
8
+ super(accessToken);
9
+ this.accessToken = accessToken;
10
+ }
11
+ async getRegions(options) {
12
+ return await this.api.get(`/watch/providers/regions`, options);
13
+ }
14
+ async getMovieProviders(options) {
15
+ return await this.api.get(`/watch/providers/movie`, options);
16
+ }
17
+ async getTvProviders(options) {
18
+ return await this.api.get(`/watch/providers/tv`, options);
19
+ }
20
+ }
21
+ exports.WatchProvidersEndpoint = WatchProvidersEndpoint;
22
+ //# sourceMappingURL=watch-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch-providers.js","sourceRoot":"","sources":["../../src/endpoints/watch-providers.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAUtC,MAAa,sBAAuB,SAAQ,mBAAY;IACvB;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAwB;QACvC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,0BAA0B,EAC1B,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,OAAyB;QAEzB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,wBAAwB,EACxB,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,OAAyB;QAEzB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,qBAAqB,EACrB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA7BD,wDA6BC"}
package/dist/tmdb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint } from './endpoints';
1
+ import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint, WatchProvidersEndpoint } from './endpoints';
2
2
  import { CompaniesEndpoint } from './endpoints/companies';
3
3
  import { NetworksEndpoint } from './endpoints/networks';
4
4
  export declare class TMDB {
@@ -24,4 +24,5 @@ export declare class TMDB {
24
24
  get keywords(): KeywordsEndpoint;
25
25
  get collections(): CollectionsEndpoint;
26
26
  get tvSeasons(): TvSeasonsEndpoint;
27
+ get watchProviders(): WatchProvidersEndpoint;
27
28
  }
package/dist/tmdb.js CHANGED
@@ -69,6 +69,9 @@ class TMDB {
69
69
  get tvSeasons() {
70
70
  return new endpoints_1.TvSeasonsEndpoint(this.accessToken);
71
71
  }
72
+ get watchProviders() {
73
+ return new endpoints_1.WatchProvidersEndpoint(this.accessToken);
74
+ }
72
75
  }
73
76
  exports.TMDB = TMDB;
74
77
  //# 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,2CAmBqB;AACrB,qDAA0D;AAC1D,mDAAwD;AAExD,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;IAC/C,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,iCAAqB,CAAC,IA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AC,WAAW,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,kCAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtD,CAAC;CACF;AA1FD,oBA0FC"}
@@ -1,3 +1,4 @@
1
+ import { CountryCode } from '../types';
1
2
  export interface Gravatar {
2
3
  hash: string;
3
4
  }
@@ -8,7 +9,7 @@ export interface AccountDetails {
8
9
  avatar: Avatar;
9
10
  id: number;
10
11
  include_adult: boolean;
11
- iso_3166_1: string;
12
+ iso_3166_1: CountryCode;
12
13
  iso_639_1: string;
13
14
  name: string;
14
15
  username: string;
@@ -5,14 +5,56 @@ export interface Certification {
5
5
  }
6
6
  export interface Certifications {
7
7
  certifications: {
8
- US: Certification[];
9
- CA: Certification[];
10
- DE: Certification[];
11
- GB: Certification[];
8
+ AR: Certification[];
9
+ AT: Certification[];
12
10
  AU: Certification[];
11
+ BG: Certification[];
13
12
  BR: Certification[];
13
+ CA: Certification[];
14
+ 'CA-QC': Certification[];
15
+ CH: Certification[];
16
+ CL: Certification[];
17
+ CZ: Certification[];
18
+ DE: Certification[];
19
+ DK: Certification[];
20
+ ES: Certification[];
21
+ FI: Certification[];
14
22
  FR: Certification[];
15
- NZ: Certification[];
23
+ GB: Certification[];
24
+ GR: Certification[];
25
+ HK: Certification[];
26
+ HU: Certification[];
27
+ ID: Certification[];
28
+ IE: Certification[];
29
+ IL: Certification[];
16
30
  IN: Certification[];
31
+ IT: Certification[];
32
+ JP: Certification[];
33
+ KR: Certification[];
34
+ LT: Certification[];
35
+ LU: Certification[];
36
+ LV: Certification[];
37
+ MO: Certification[];
38
+ MX: Certification[];
39
+ MY: Certification[];
40
+ NL: Certification[];
41
+ NO: Certification[];
42
+ NZ: Certification[];
43
+ PH: Certification[];
44
+ PL: Certification[];
45
+ PR: Certification[];
46
+ PT: Certification[];
47
+ RO: Certification[];
48
+ RU: Certification[];
49
+ SE: Certification[];
50
+ SG: Certification[];
51
+ SK: Certification[];
52
+ TH: Certification[];
53
+ TR: Certification[];
54
+ TW: Certification[];
55
+ UA: Certification[];
56
+ US: Certification[];
57
+ VI: Certification[];
58
+ ZA: Certification[];
17
59
  };
18
60
  }
@@ -1,6 +1,6 @@
1
1
  export interface MediaChange {
2
2
  id: number;
3
- adult: boolean | undefined;
3
+ adult?: boolean;
4
4
  }
5
5
  export interface MediaChanges {
6
6
  results: MediaChange[];
@@ -1,15 +1,12 @@
1
1
  import { LanguageOption, Movie } from '.';
2
2
  export interface Collection {
3
3
  id: number;
4
- backdrop_path: string;
5
4
  name: string;
6
- poster_path: string;
7
- adult: boolean;
8
- original_language: string;
9
- original_name: string;
10
5
  overview: string;
6
+ poster_path: string;
7
+ backdrop_path: string;
11
8
  }
12
- export interface DetailedCollection extends Collection {
9
+ export interface CollectionDetails extends Collection {
13
10
  parts: Movie[];
14
11
  }
15
12
  export interface CollectionImageOptions extends LanguageOption {
@@ -7,7 +7,7 @@ export interface CompanyDetails {
7
7
  logo_path: string;
8
8
  name: string;
9
9
  origin_country: string;
10
- parent_company: ParentCompany;
10
+ parent_company?: ParentCompany;
11
11
  }
12
12
  export interface ParentCompany {
13
13
  name: string;