tmdb-ts 0.1.5 → 0.1.6

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 (66) hide show
  1. package/dist/api.js +2 -2
  2. package/dist/api.js.map +1 -1
  3. package/dist/endpoints/collections.d.ts +9 -0
  4. package/dist/endpoints/collections.js +29 -0
  5. package/dist/endpoints/collections.js.map +1 -0
  6. package/dist/endpoints/discover.d.ts +63 -0
  7. package/dist/endpoints/discover.js +24 -0
  8. package/dist/endpoints/discover.js.map +1 -0
  9. package/dist/endpoints/find.d.ts +6 -0
  10. package/dist/endpoints/find.js +19 -0
  11. package/dist/endpoints/find.js.map +1 -0
  12. package/dist/endpoints/index.d.ts +7 -0
  13. package/dist/endpoints/index.js +12 -1
  14. package/dist/endpoints/index.js.map +1 -1
  15. package/dist/endpoints/keywords.d.ts +7 -0
  16. package/dist/endpoints/keywords.js +23 -0
  17. package/dist/endpoints/keywords.js.map +1 -0
  18. package/dist/endpoints/people.d.ts +23 -0
  19. package/dist/endpoints/people.js +52 -0
  20. package/dist/endpoints/people.js.map +1 -0
  21. package/dist/endpoints/review.d.ts +6 -0
  22. package/dist/endpoints/review.js +14 -0
  23. package/dist/endpoints/review.js.map +1 -0
  24. package/dist/endpoints/trending.d.ts +6 -0
  25. package/dist/endpoints/trending.js +14 -0
  26. package/dist/endpoints/trending.js.map +1 -0
  27. package/dist/endpoints/tv-shows.d.ts +2 -1
  28. package/dist/endpoints/tv-shows.js +3 -0
  29. package/dist/endpoints/tv-shows.js.map +1 -1
  30. package/dist/index.js +5 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/tmdb.d.ts +8 -1
  33. package/dist/tmdb.js +21 -0
  34. package/dist/tmdb.js.map +1 -1
  35. package/dist/types/collections.d.ts +14 -0
  36. package/dist/types/collections.js +3 -0
  37. package/dist/types/collections.js.map +1 -0
  38. package/dist/types/credits.d.ts +4 -29
  39. package/dist/types/discover.d.ts +14 -0
  40. package/dist/types/discover.js +3 -0
  41. package/dist/types/discover.js.map +1 -0
  42. package/dist/types/find.d.ts +21 -0
  43. package/dist/types/find.js +3 -0
  44. package/dist/types/find.js.map +1 -0
  45. package/dist/types/index.d.ts +17 -8
  46. package/dist/types/index.js +13 -1
  47. package/dist/types/index.js.map +1 -1
  48. package/dist/types/keywords.d.ts +21 -0
  49. package/dist/types/keywords.js +3 -0
  50. package/dist/types/keywords.js.map +1 -0
  51. package/dist/types/options.d.ts +8 -0
  52. package/dist/types/options.js +3 -0
  53. package/dist/types/options.js.map +1 -0
  54. package/dist/types/people.d.ts +148 -0
  55. package/dist/types/people.js +3 -0
  56. package/dist/types/people.js.map +1 -0
  57. package/dist/types/review.d.ts +7 -0
  58. package/dist/types/review.js +3 -0
  59. package/dist/types/review.js.map +1 -0
  60. package/dist/types/trending.d.ts +13 -0
  61. package/dist/types/trending.js +3 -0
  62. package/dist/types/trending.js.map +1 -0
  63. package/dist/types/tv-shows.d.ts +39 -1
  64. package/dist/utils/index.js +5 -1
  65. package/dist/utils/index.js.map +1 -1
  66. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const node_fetch_1 = __importDefault(require("node-fetch"));
6
+ const cross_fetch_1 = __importDefault(require("cross-fetch"));
7
7
  const BASE_URL_V3 = 'https://api.themoviedb.org/3';
8
8
  class Api {
9
9
  constructor(accessToken) {
@@ -11,7 +11,7 @@ class Api {
11
11
  this.accessToken = accessToken;
12
12
  }
13
13
  async get(path) {
14
- const response = await node_fetch_1.default(`${BASE_URL_V3}${path}`, {
14
+ const response = await (0, cross_fetch_1.default)(`${BASE_URL_V3}${path}`, {
15
15
  method: 'GET',
16
16
  headers: {
17
17
  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,4DAA+B;AAE/B,MAAM,WAAW,GAAG,8BAA8B,CAAC;AAEnD,MAAqB,GAAG;IACtB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,GAAG,CAAI,IAAY;QACvB,MAAM,QAAQ,GAAG,MAAM,oBAAK,CAAC,GAAG,WAAW,GAAG,IAAI,EAAE,EAAE;YACpD,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;gBAC3C,cAAc,EAAE,gCAAgC;aACjD;SACF,CAAC,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAO,CAAC;IACpC,CAAC;CACF;AAfD,sBAeC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;AAAA,8DAAgC;AAEhC,MAAM,WAAW,GAAG,8BAA8B,CAAC;AAEnD,MAAqB,GAAG;IACtB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,GAAG,CAAI,IAAY;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAK,EAAC,GAAG,WAAW,GAAG,IAAI,EAAE,EAAE;YACpD,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;gBAC3C,cAAc,EAAE,gCAAgC;aACjD;SACF,CAAC,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAO,CAAC;IACpC,CAAC;CACF;AAfD,sBAeC"}
@@ -0,0 +1,9 @@
1
+ import { DetailedCollection, ImageCollection, LanguageOption, Translations } from '../types';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class CollectionsEndpoint extends BaseEndpoint {
4
+ protected readonly accessToken: string;
5
+ constructor(accessToken: string);
6
+ details(id: number, options?: LanguageOption): Promise<DetailedCollection>;
7
+ images(id: number, options?: LanguageOption): Promise<ImageCollection>;
8
+ translations(id: number, options?: LanguageOption): Promise<Translations>;
9
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CollectionsEndpoint = void 0;
7
+ const base_1 = require("./base");
8
+ const querystring_1 = __importDefault(require("querystring"));
9
+ const BASE_COLLECTION = '/collection';
10
+ class CollectionsEndpoint extends base_1.BaseEndpoint {
11
+ constructor(accessToken) {
12
+ super(accessToken);
13
+ this.accessToken = accessToken;
14
+ }
15
+ async details(id, options) {
16
+ const params = querystring_1.default.encode(options);
17
+ return await this.api.get(`${BASE_COLLECTION}/${id}?${params}`);
18
+ }
19
+ async images(id, options) {
20
+ const params = querystring_1.default.encode(options);
21
+ return await this.api.get(`${BASE_COLLECTION}/${id}/images?${params}`);
22
+ }
23
+ async translations(id, options) {
24
+ const params = querystring_1.default.encode(options);
25
+ return await this.api.get(`${BASE_COLLECTION}/${id}/translations?${params}`);
26
+ }
27
+ }
28
+ exports.CollectionsEndpoint = CollectionsEndpoint;
29
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/endpoints/collections.ts"],"names":[],"mappings":";;;;;;AACA,iCAAuC;AACvC,8DAAsC;AAEtC,MAAM,eAAe,GAAG,aAAa,CAAC;AAEtC,MAAa,mBAAoB,SAAQ,mBAAY;IACnD,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU,EAAE,OAAyB;QACjD,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAqB,GAAG,eAAe,IAAI,EAAE,IAAI,MAAM,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAyB;QAChD,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAkB,GAAG,eAAe,IAAI,EAAE,WAAW,MAAM,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,OAAyB;QACtD,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,GAAG,eAAe,IAAI,EAAE,iBAAiB,MAAM,EAAE,CAAC,CAAC;IAC7F,CAAC;CAEF;AApBD,kDAoBC"}
@@ -0,0 +1,63 @@
1
+ /// <reference types="node" />
2
+ import { MovieDiscoverResult, SortOption, TvShowDiscoverResult } from '../types';
3
+ import { BaseEndpoint } from './base';
4
+ import { ParsedUrlQueryInput } from 'querystring';
5
+ interface DiscoverQueryOptions extends ParsedUrlQueryInput {
6
+ language?: string;
7
+ sort_by?: SortOption;
8
+ page?: number;
9
+ 'vote_average.gte'?: number;
10
+ 'vote_count.gte'?: number;
11
+ 'vote_count.lte'?: number;
12
+ 'vote_average.lte'?: number;
13
+ with_watch_providers?: string;
14
+ watch_region?: string;
15
+ without_companies?: string;
16
+ with_watch_monetization_types?: 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
17
+ 'with_runtime.gte'?: number;
18
+ 'with_runtime.lte'?: number;
19
+ with_genres?: string;
20
+ without_genres?: string;
21
+ with_original_language?: string;
22
+ without_keywords?: string;
23
+ with_keywords?: string;
24
+ with_companies?: string;
25
+ }
26
+ interface MovieQueryOptions extends DiscoverQueryOptions {
27
+ region?: string;
28
+ certification_country?: string;
29
+ certification?: string;
30
+ 'certification.lte'?: string;
31
+ 'certification.gte'?: string;
32
+ include_adult?: boolean;
33
+ include_video?: boolean;
34
+ primary_release_year?: number;
35
+ 'primary_release_date.gte'?: string;
36
+ 'primary_release_date.lte'?: string;
37
+ 'release_date.gte'?: string;
38
+ 'release_date.lte'?: string;
39
+ with_release_type?: string;
40
+ year?: number;
41
+ with_cast?: string;
42
+ with_crew?: string;
43
+ with_people?: string;
44
+ }
45
+ interface TvShowQueryOptions extends DiscoverQueryOptions {
46
+ 'air_date.gte'?: string;
47
+ 'air_date.lte'?: string;
48
+ 'first_air_date.gte'?: string;
49
+ 'first_air_date.lte'?: string;
50
+ first_air_date_year?: number;
51
+ timezone?: string;
52
+ with_networks?: string;
53
+ include_null_first_air_dates?: boolean;
54
+ screened_theatrically?: boolean;
55
+ with_status?: string;
56
+ with_type?: string;
57
+ }
58
+ export declare class DiscoverEndpoint extends BaseEndpoint {
59
+ constructor(accessToken: string);
60
+ movie(options?: MovieQueryOptions): Promise<MovieDiscoverResult>;
61
+ tvShow(options?: TvShowQueryOptions): Promise<TvShowDiscoverResult>;
62
+ }
63
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DiscoverEndpoint = void 0;
7
+ const base_1 = require("./base");
8
+ const querystring_1 = __importDefault(require("querystring"));
9
+ const BASE_DISCOVER = '/discover';
10
+ class DiscoverEndpoint extends base_1.BaseEndpoint {
11
+ constructor(accessToken) {
12
+ super(accessToken);
13
+ }
14
+ async movie(options) {
15
+ const params = querystring_1.default.encode(options);
16
+ return await this.api.get(`${BASE_DISCOVER}/movie?${params}`);
17
+ }
18
+ async tvShow(options) {
19
+ const params = querystring_1.default.encode(options);
20
+ return await this.api.get(`${BASE_DISCOVER}/tv?${params}`);
21
+ }
22
+ }
23
+ exports.DiscoverEndpoint = DiscoverEndpoint;
24
+ //# sourceMappingURL=discover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/endpoints/discover.ts"],"names":[],"mappings":";;;;;;AACA,iCAAsC;AACtC,8DAA+D;AAE/D,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,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAsB,GAAG,aAAa,UAAU,MAAM,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA4B;QACvC,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAuB,GAAG,aAAa,OAAO,MAAM,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AAdD,4CAcC"}
@@ -0,0 +1,6 @@
1
+ import { BaseEndpoint } from './base';
2
+ import { ExternalIdOptions, FindResult } from '../types';
3
+ export declare class FindEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ byId(externalId: string, options: ExternalIdOptions): Promise<FindResult>;
6
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FindEndpoint = void 0;
7
+ const base_1 = require("./base");
8
+ const querystring_1 = __importDefault(require("querystring"));
9
+ class FindEndpoint extends base_1.BaseEndpoint {
10
+ constructor(accessToken) {
11
+ super(accessToken);
12
+ }
13
+ async byId(externalId, options) {
14
+ const params = querystring_1.default.encode(options);
15
+ return await this.api.get(`/find/${externalId}?${params}`);
16
+ }
17
+ }
18
+ exports.FindEndpoint = FindEndpoint;
19
+ //# sourceMappingURL=find.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/endpoints/find.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AACtC,8DAAsC;AAGtC,MAAa,YAAa,SAAQ,mBAAY;IAC5C,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,UAAkB,EAAE,OAA0B;QACvD,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAa,SAAS,UAAU,IAAI,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AATD,oCASC"}
@@ -7,3 +7,10 @@ export * from './genre';
7
7
  export * from './movies';
8
8
  export * from './configuration';
9
9
  export * from './tv-shows';
10
+ export * from './discover';
11
+ export * from './people';
12
+ export * from './review';
13
+ export * from './trending';
14
+ export * from './find';
15
+ export * from './keywords';
16
+ export * from './collections';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -19,4 +23,11 @@ __exportStar(require("./genre"), exports);
19
23
  __exportStar(require("./movies"), exports);
20
24
  __exportStar(require("./configuration"), exports);
21
25
  __exportStar(require("./tv-shows"), exports);
26
+ __exportStar(require("./discover"), exports);
27
+ __exportStar(require("./people"), exports);
28
+ __exportStar(require("./review"), exports);
29
+ __exportStar(require("./trending"), exports);
30
+ __exportStar(require("./find"), exports);
31
+ __exportStar(require("./keywords"), exports);
32
+ __exportStar(require("./collections"), exports);
22
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,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"}
@@ -0,0 +1,7 @@
1
+ import { BaseEndpoint } from './base';
2
+ import { BelongingMovies, Keyword, KeywordsOptions } from '../types';
3
+ export declare class KeywordsEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ details(keywordId: number): Promise<Keyword>;
6
+ belongingMovies(keywordId: number, options?: KeywordsOptions): Promise<BelongingMovies>;
7
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.KeywordsEndpoint = void 0;
7
+ const base_1 = require("./base");
8
+ const querystring_1 = __importDefault(require("querystring"));
9
+ const BASE_Keyword = '/keyword';
10
+ class KeywordsEndpoint extends base_1.BaseEndpoint {
11
+ constructor(accessToken) {
12
+ super(accessToken);
13
+ }
14
+ async details(keywordId) {
15
+ return await this.api.get(`${BASE_Keyword}/${keywordId}`);
16
+ }
17
+ async belongingMovies(keywordId, options) {
18
+ const params = querystring_1.default.encode(options);
19
+ return await this.api.get(`${BASE_Keyword}/${keywordId}/movies?${params}`);
20
+ }
21
+ }
22
+ exports.KeywordsEndpoint = KeywordsEndpoint;
23
+ //# sourceMappingURL=keywords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AACtC,8DAAsC;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,SAAkB;QAC9B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAU,GAAG,YAAY,IAAI,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,SAAkB,EAAE,OAAyB;QACjE,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAkB,GAAG,YAAY,IAAI,SAAS,WAAW,MAAM,EAAE,CAAC,CAAC;IAC9F,CAAC;CACF;AAbD,4CAaC"}
@@ -0,0 +1,23 @@
1
+ import { ChangeOptions, ExternalIds, Image, PeopleTranslations, PersonChanges, PersonCombinedCredits, PersonDetail, PersonMovieCredit, PersonTvShowCredit, PopularPersons, TaggedImages } from '../types';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class PeopleEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ details(id: number): Promise<PersonDetail>;
6
+ changes(id: number, options?: ChangeOptions): Promise<PersonChanges>;
7
+ movieCredits(id: number): Promise<PersonMovieCredit>;
8
+ tvShowCredits(id: number): Promise<PersonTvShowCredit>;
9
+ combinedCredits(id: number): Promise<PersonCombinedCredits>;
10
+ externalId(id: number): Promise<ExternalIds>;
11
+ images(id: number): Promise<{
12
+ id: number;
13
+ profiles: Image[];
14
+ }>;
15
+ taggedImages(id: number, options?: {
16
+ page?: number;
17
+ }): Promise<TaggedImages>;
18
+ translation(id: number): Promise<PeopleTranslations>;
19
+ latest(): Promise<PersonDetail>;
20
+ popular(options?: {
21
+ page?: number;
22
+ }): Promise<PopularPersons>;
23
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PeopleEndpoint = void 0;
7
+ const base_1 = require("./base");
8
+ const querystring_1 = __importDefault(require("querystring"));
9
+ const BASE_PERSON = '/person';
10
+ class PeopleEndpoint extends base_1.BaseEndpoint {
11
+ constructor(accessToken) {
12
+ super(accessToken);
13
+ }
14
+ async details(id) {
15
+ return await this.api.get(`${BASE_PERSON}/${id}`);
16
+ }
17
+ async changes(id, options) {
18
+ const params = querystring_1.default.encode(options);
19
+ return await this.api.get(`${BASE_PERSON}/${id}/changes?${params}`);
20
+ }
21
+ async movieCredits(id) {
22
+ return await this.api.get(`${BASE_PERSON}/${id}/movie_credits`);
23
+ }
24
+ async tvShowCredits(id) {
25
+ return await this.api.get(`${BASE_PERSON}/${id}/tv_credits`);
26
+ }
27
+ async combinedCredits(id) {
28
+ return await this.api.get(`${BASE_PERSON}/${id}/combined_credits`);
29
+ }
30
+ async externalId(id) {
31
+ return await this.api.get(`${BASE_PERSON}/${id}/external_ids`);
32
+ }
33
+ async images(id) {
34
+ return await this.api.get(`${BASE_PERSON}/${id}/images`);
35
+ }
36
+ async taggedImages(id, options) {
37
+ const params = querystring_1.default.encode(options);
38
+ return await this.api.get(`${BASE_PERSON}/${id}/tagged_images?${params}`);
39
+ }
40
+ async translation(id) {
41
+ return await this.api.get(`${BASE_PERSON}/${id}/translations`);
42
+ }
43
+ async latest() {
44
+ return await this.api.get(`${BASE_PERSON}/latest`);
45
+ }
46
+ async popular(options) {
47
+ const params = querystring_1.default.encode(options);
48
+ return await this.api.get(`${BASE_PERSON}/popular?${params}`);
49
+ }
50
+ }
51
+ exports.PeopleEndpoint = PeopleEndpoint;
52
+ //# sourceMappingURL=people.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/endpoints/people.ts"],"names":[],"mappings":";;;;;;AACA,iCAAsC;AACtC,8DAAsC;AAEtC,MAAM,WAAW,GAAG,SAAS,CAAC;AAG9B,MAAa,cAAe,SAAQ,mBAAY;IAC/C,YAAY,WAAmB;QAC9B,KAAK,CAAC,WAAW,CAAC,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACvB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,GAAG,WAAW,IAAI,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU,EAAE,OAAwB;QACjD,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,GAAG,WAAW,IAAI,EAAE,YAAY,MAAM,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,KAAK,C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AK,CAAC,OAAO,CAAC,OAAyB;QACtC,MAAM,MAAM,GAAG,qBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiB,GAAG,WAAW,YAAY,MAAM,EAAE,CAAC,CAAC;IAC/E,CAAC;CACD;AAnDD,wCAmDC"}
@@ -0,0 +1,6 @@
1
+ import { ReviewDetails } from '../types';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class ReviewEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ details(id: string): Promise<ReviewDetails>;
6
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReviewEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ class ReviewEndpoint extends base_1.BaseEndpoint {
6
+ constructor(accessToken) {
7
+ super(accessToken);
8
+ }
9
+ async details(id) {
10
+ return await this.api.get(`/review/${id}`);
11
+ }
12
+ }
13
+ exports.ReviewEndpoint = ReviewEndpoint;
14
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/endpoints/review.ts"],"names":[],"mappings":";;;AACA,iCAAsC;AAEtC,MAAa,cAAe,SAAQ,mBAAY;IAC9C,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,WAAW,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AARD,wCAQC"}
@@ -0,0 +1,6 @@
1
+ import { MediaType, TimeWindow, TrendingResults } from '../types';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class TrendingEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ trending<T extends MediaType>(mediaType: T, timeWindow: TimeWindow): Promise<TrendingResults<T>>;
6
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrendingEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ class TrendingEndpoint extends base_1.BaseEndpoint {
6
+ constructor(accessToken) {
7
+ super(accessToken);
8
+ }
9
+ async trending(mediaType, timeWindow) {
10
+ return await this.api.get(`/trending/${mediaType}/${timeWindow}`);
11
+ }
12
+ }
13
+ exports.TrendingEndpoint = TrendingEndpoint;
14
+ //# sourceMappingURL=trending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trending.js","sourceRoot":"","sources":["../../src/endpoints/trending.ts"],"names":[],"mappings":";;;AACA,iCAAsC;AAEtC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAsB,SAAa,EAAE,UAAsB;QACvE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAqB,aAAa,SAAS,IAAI,UAAU,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AARD,4CAQC"}
@@ -1,5 +1,5 @@
1
1
  import { BaseEndpoint } from './base';
2
- import { AlternativeTitles, ChangeOptions, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LatestTvShows, OnTheAir, PopularTvShows, Recommendations, Reviews, ScreenedTheatrically, SimilarTvShows, TopRatedTvShows, Translations, TvShowChanges, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
2
+ import { AlternativeTitles, ChangeOptions, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LatestTvShows, OnTheAir, PopularTvShows, Recommendations, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChanges, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
3
3
  export declare class TvShowsEndpoint extends BaseEndpoint {
4
4
  protected readonly accessToken: string;
5
5
  constructor(accessToken: string);
@@ -8,6 +8,7 @@ export declare class TvShowsEndpoint extends BaseEndpoint {
8
8
  changes(id: number, options?: ChangeOptions): Promise<TvShowChanges>;
9
9
  contentRatings(id: number): Promise<ContentRatings>;
10
10
  credits(id: number): Promise<Credits>;
11
+ season(tvId: number, seasonNumber: number): Promise<SeasonDetails>;
11
12
  episodeGroups(id: number): Promise<EpisodeGroups>;
12
13
  externalIds(id: number): Promise<ExternalIds>;
13
14
  images(id: number): Promise<Images>;
@@ -28,6 +28,9 @@ class TvShowsEndpoint extends base_1.BaseEndpoint {
28
28
  async credits(id) {
29
29
  return await this.api.get(`${BASE_TV}/${id}/credits`);
30
30
  }
31
+ async season(tvId, seasonNumber) {
32
+ return await this.api.get(`${BASE_TV}/${tvId}/season/${seasonNumber}`);
33
+ }
31
34
  async episodeGroups(id) {
32
35
  return await this.api.get(`${BASE_TV}/${id}/episode_groups`);
33
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tv-shows.js","sourceRoot":"","sources":["../../src/endpoints/tv-shows.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AAyBtC,8DAAsC;AAEtC,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,MAAa,eAAgB,SAAQ,mBAAY;IAC/C,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,GAAG,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,EAAU;QAChC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAoB,GAAG,OAAO,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACtF,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU,E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;CAEF;AAxGD,0CAwGC"}
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,0CAAwB;AACxB,0CAAwB;AAExB,kBAAe,cAAI,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,0CAAwB;AACxB,0CAAwB;AAExB,kBAAe,cAAI,CAAC"}
package/dist/tmdb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint } from './endpoints';
1
+ import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint } from './endpoints';
2
2
  export default class TMDB {
3
3
  private readonly accessToken;
4
4
  constructor(accessToken: string);
@@ -11,4 +11,11 @@ export default class TMDB {
11
11
  get genres(): GenreEndpoint;
12
12
  get movies(): MoviesEndpoint;
13
13
  get tvShows(): TvShowsEndpoint;
14
+ get discover(): DiscoverEndpoint;
15
+ get people(): PeopleEndpoint;
16
+ get review(): ReviewEndpoint;
17
+ get trending(): TrendingEndpoint;
18
+ get find(): FindEndpoint;
19
+ get keywords(): KeywordsEndpoint;
20
+ get collections(): CollectionsEndpoint;
14
21
  }
package/dist/tmdb.js CHANGED
@@ -32,6 +32,27 @@ class TMDB {
32
32
  get tvShows() {
33
33
  return new endpoints_1.TvShowsEndpoint(this.accessToken);
34
34
  }
35
+ get discover() {
36
+ return new endpoints_1.DiscoverEndpoint(this.accessToken);
37
+ }
38
+ get people() {
39
+ return new endpoints_1.PeopleEndpoint(this.accessToken);
40
+ }
41
+ get review() {
42
+ return new endpoints_1.ReviewEndpoint(this.accessToken);
43
+ }
44
+ get trending() {
45
+ return new endpoints_1.TrendingEndpoint(this.accessToken);
46
+ }
47
+ get find() {
48
+ return new endpoints_1.FindEndpoint(this.accessToken);
49
+ }
50
+ get keywords() {
51
+ return new endpoints_1.KeywordsEndpoint(this.accessToken);
52
+ }
53
+ get collections() {
54
+ return new endpoints_1.CollectionsEndpoint(this.accessToken);
55
+ }
35
56
  }
36
57
  exports.default = TMDB;
37
58
  //# 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,2CAUqB;AAErB,MAAqB,IAAI;IAGvB,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,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,cAAc;Q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,CAAC,WAAW,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,yBAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,2BAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,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;CACF;AAtED,uBAsEC"}
@@ -0,0 +1,14 @@
1
+ import { Movie } from ".";
2
+ export interface Collection {
3
+ id: number;
4
+ backdrop_path: string;
5
+ name: string;
6
+ poster_path: string;
7
+ adult: boolean;
8
+ original_language: string;
9
+ original_name: string;
10
+ overview: string;
11
+ }
12
+ export interface DetailedCollection extends Collection {
13
+ parts: Movie[];
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/types/collections.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Person } from './';
1
+ import { Image, Person } from './';
2
2
  export interface CreditSeason {
3
3
  air_date?: string;
4
4
  poster_path?: string;
@@ -72,28 +72,10 @@ export interface Credits {
72
72
  cast: Cast[];
73
73
  crew: Crew[];
74
74
  }
75
- export interface Backdrop {
76
- aspect_ratio: number;
77
- file_path: string;
78
- height: number;
79
- iso_639_1?: any;
80
- vote_average: number;
81
- vote_count: number;
82
- width: number;
83
- }
84
- export interface Poster {
85
- aspect_ratio: number;
86
- file_path: string;
87
- height: number;
88
- iso_639_1: string;
89
- vote_average: number;
90
- vote_count: number;
91
- width: number;
92
- }
93
- export interface CreditImages {
75
+ export interface ImageCollection {
94
76
  id: number;
95
- backdrops: Backdrop[];
96
- posters: Poster[];
77
+ backdrops: Image[];
78
+ posters: Image[];
97
79
  }
98
80
  export interface Video {
99
81
  id: string;
@@ -109,10 +91,3 @@ export interface Videos {
109
91
  id: number;
110
92
  results: Video[];
111
93
  }
112
- export interface Keywords {
113
- id: number;
114
- keywords: Array<{
115
- id: number;
116
- name: string;
117
- }>;
118
- }
@@ -0,0 +1,14 @@
1
+ import { Movie, TV } from ".";
2
+ export type SortOption = 'popularity.asc' | 'popularity.desc' | 'release_date.asc' | 'release_date.desc' | 'revenue.asc' | 'revenue.desc' | 'primary_release_date.asc' | 'primary_release_date.desc' | 'original_title.asc' | 'original_title.desc' | 'vote_average.asc' | 'vote_average.desc' | 'vote_count.asc' | 'vote_count.desc';
3
+ export interface MovieDiscoverResult {
4
+ page: number;
5
+ results: Movie[];
6
+ total_results: number;
7
+ total_pages: number;
8
+ }
9
+ export interface TvShowDiscoverResult {
10
+ page: number;
11
+ results: TV[];
12
+ total_results: number;
13
+ total_pages: number;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=discover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/types/discover.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+ import { ParsedUrlQueryInput } from 'querystring';
3
+ import { Episode, MediaType, Movie, Person, Season, TV } from '.';
4
+ export type ExternalSource = 'imdb_id' | 'freebase_mid' | 'freebase_id' | 'tvdb_id' | 'tvrage_id' | 'facebook_id' | 'twitter_id' | 'instagram_id';
5
+ export interface ExternalIdOptions extends ParsedUrlQueryInput {
6
+ external_source: ExternalSource;
7
+ language?: string;
8
+ }
9
+ type MediaTagged<T> = T & {
10
+ media_type: MediaType;
11
+ };
12
+ export interface FindResult {
13
+ movie_results: MediaTagged<Movie>[];
14
+ person_results: MediaTagged<Person>[];
15
+ tv_results: MediaTagged<TV>[];
16
+ tv_episode_results: MediaTagged<Episode>[];
17
+ tv_season_results: MediaTagged<Season & {
18
+ show_id: string;
19
+ }>[];
20
+ }
21
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=find.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/types/find.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ export * from './options';
1
2
  export * from './certification';
2
3
  export * from './credits';
3
4
  export * from './configuration';
@@ -6,6 +7,13 @@ export * from './movies';
6
7
  export * from './search';
7
8
  export * from './tv-shows';
8
9
  export * from './watch-providers';
10
+ export * from './people';
11
+ export * from './discover';
12
+ export * from './review';
13
+ export * from './trending';
14
+ export * from './find';
15
+ export * from './keywords';
16
+ export * from './collections';
9
17
  export interface AuthorDetails {
10
18
  name: string;
11
19
  username: string;
@@ -39,16 +47,8 @@ export interface Person {
39
47
  gender: number;
40
48
  popularity: number;
41
49
  }
42
- export interface Collection {
43
- id: number;
44
- backdrop_path: string;
45
- name: string;
46
- poster_path: string;
47
- }
48
50
  export interface Movie {
49
51
  id: number;
50
- logo_path: string;
51
- name: string;
52
52
  poster_path: string;
53
53
  adult: boolean;
54
54
  overview: string;
@@ -172,3 +172,12 @@ export interface Translations {
172
172
  id: number;
173
173
  translations: Translation[];
174
174
  }
175
+ export interface Image {
176
+ aspect_ratio: number;
177
+ file_path: string;
178
+ height: number;
179
+ iso_639_1: string;
180
+ vote_average: number;
181
+ vote_count: number;
182
+ width: number;
183
+ }
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -10,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./options"), exports);
13
18
  __exportStar(require("./certification"), exports);
14
19
  __exportStar(require("./credits"), exports);
15
20
  __exportStar(require("./configuration"), exports);
@@ -18,4 +23,11 @@ __exportStar(require("./movies"), exports);
18
23
  __exportStar(require("./search"), exports);
19
24
  __exportStar(require("./tv-shows"), exports);
20
25
  __exportStar(require("./watch-providers"), exports);
26
+ __exportStar(require("./people"), exports);
27
+ __exportStar(require("./discover"), exports);
28
+ __exportStar(require("./review"), exports);
29
+ __exportStar(require("./trending"), exports);
30
+ __exportStar(require("./find"), exports);
31
+ __exportStar(require("./keywords"), exports);
32
+ __exportStar(require("./collections"), exports);
21
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,4CAA2B;AAC3B,kDAAgC;AAChC,4CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA2B;AAC3B,kDAAgC;AAChC,4CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B"}
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+ import { ParsedUrlQueryInput } from 'querystring';
3
+ import { Movie } from '.';
4
+ export interface KeywordsOptions extends ParsedUrlQueryInput {
5
+ include_adult?: boolean;
6
+ language?: string;
7
+ }
8
+ export interface BelongingMovies {
9
+ page: number;
10
+ results: Movie[];
11
+ total_results: number;
12
+ total_pages: number;
13
+ }
14
+ export interface Keyword {
15
+ id: number;
16
+ name: string;
17
+ }
18
+ export interface Keywords {
19
+ id: number;
20
+ keywords: Keyword[];
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=keywords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../../src/types/keywords.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { ParsedUrlQueryInput } from 'querystring';
3
+ export interface LanguageOption extends ParsedUrlQueryInput {
4
+ language?: string;
5
+ }
6
+ export interface PageOption extends ParsedUrlQueryInput {
7
+ page?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,148 @@
1
+ import { Movie, Person, TV } from ".";
2
+ interface Cast {
3
+ character: string;
4
+ credit_id: string;
5
+ vote_count: number;
6
+ id: number;
7
+ backdrop_path: string;
8
+ poster_path: string;
9
+ original_language: string;
10
+ vote_average: number;
11
+ genre_ids: number[];
12
+ popularity: number;
13
+ overview: string;
14
+ }
15
+ interface Crew {
16
+ id: number;
17
+ department: string;
18
+ original_language: string;
19
+ credit_id: string;
20
+ overview: string;
21
+ vote_count: number;
22
+ poster_path: string;
23
+ backdrop_path: string;
24
+ popularity: number;
25
+ genre_ids: number[];
26
+ job: string;
27
+ vote_average: number;
28
+ }
29
+ export interface PersonMovieCast extends Cast {
30
+ release_date: string;
31
+ video: boolean;
32
+ adult: boolean;
33
+ title: string;
34
+ original_title: string;
35
+ }
36
+ export interface PersonMovieCrew extends Crew {
37
+ original_title: string;
38
+ video: boolean;
39
+ title: string;
40
+ adult: boolean;
41
+ release_date: string;
42
+ }
43
+ export interface PersonTvShowCrew extends Crew {
44
+ episode_count: number;
45
+ origin_country: string[];
46
+ original_name: string;
47
+ name: string;
48
+ first_air_date: string;
49
+ }
50
+ export interface PersonTvShowCast extends Cast {
51
+ original_name: string;
52
+ name: string;
53
+ episode_count: number;
54
+ first_air_date: string;
55
+ origin_country: string[];
56
+ }
57
+ export interface PersonMovieCredit {
58
+ cast: PersonMovieCast[];
59
+ crew: PersonMovieCrew[];
60
+ id: number;
61
+ }
62
+ export interface PersonTvShowCredit {
63
+ cast: PersonTvShowCast[];
64
+ crew: PersonTvShowCrew[];
65
+ id: number;
66
+ }
67
+ export interface PersonCombinedCredits {
68
+ cast: (PersonMovieCast & PersonTvShowCast)[];
69
+ crew: (PersonMovieCrew & PersonTvShowCrew)[];
70
+ id: number;
71
+ }
72
+ export interface PersonDetail {
73
+ birthday: string;
74
+ known_for_department: string;
75
+ deathday: string;
76
+ id: number;
77
+ name: string;
78
+ also_known_as: string[];
79
+ gender: number;
80
+ biography: string;
81
+ popularity: number;
82
+ place_of_birth: string;
83
+ profile_path: string;
84
+ adult: boolean;
85
+ imdb_id: string;
86
+ homepage: string;
87
+ }
88
+ export interface PersonChange {
89
+ id: string;
90
+ action: string;
91
+ time: string;
92
+ iso_639_1: string;
93
+ iso_3166_1: string;
94
+ value: string | {
95
+ profile: {
96
+ file_path: string;
97
+ };
98
+ };
99
+ original_value: string | {
100
+ profile: {
101
+ file_path: string;
102
+ };
103
+ };
104
+ }
105
+ export interface PersonChanges {
106
+ changes: {
107
+ key: string;
108
+ items: PersonChange[];
109
+ }[];
110
+ }
111
+ export interface PopularPersons {
112
+ page: number;
113
+ results: Person[];
114
+ total_results: number;
115
+ total_pages: number;
116
+ }
117
+ export interface TaggedImage {
118
+ aspect_ratio: number;
119
+ file_path: string;
120
+ height: number;
121
+ id: string;
122
+ iso_639_1: string;
123
+ vote_average: number;
124
+ vote_count: number;
125
+ width: number;
126
+ image_type: string;
127
+ media_type: string;
128
+ media: Movie | TV;
129
+ }
130
+ export interface TaggedImages {
131
+ page: number;
132
+ results: TaggedImage[];
133
+ total_results: number;
134
+ total_pages: number;
135
+ }
136
+ export interface PeopleTranslations {
137
+ id: number;
138
+ translations: {
139
+ iso_3166_1: string;
140
+ iso_639_1: string;
141
+ name: string;
142
+ english_name: string;
143
+ data: {
144
+ biography: string;
145
+ };
146
+ };
147
+ }
148
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=people.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/types/people.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { Review } from './';
2
+ export interface ReviewDetails extends Review {
3
+ iso_639_1: string;
4
+ media_id: number;
5
+ media_title: number;
6
+ media_type: number;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/types/review.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { Movie, Person, TV } from '.';
2
+ export type MediaType = 'all' | 'movie' | 'tv' | 'person';
3
+ export type TimeWindow = 'day' | 'week';
4
+ type TrendingResult<T extends MediaType> = T extends 'tv' ? TV : T extends 'movie' ? Movie : T extends 'person' ? Person : TV | Movie | Person;
5
+ export interface TrendingResults<T extends MediaType> {
6
+ page: number;
7
+ results: (TrendingResult<T> & {
8
+ media_type: MediaType;
9
+ })[];
10
+ total_pages: number;
11
+ total_results: number;
12
+ }
13
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=trending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trending.js","sourceRoot":"","sources":["../../src/types/trending.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
1
+ import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Crew } from './';
2
2
  export interface CreatedBy {
3
3
  id: number;
4
4
  credit_id: string;
@@ -66,6 +66,44 @@ export interface TvShowDetails {
66
66
  vote_average: number;
67
67
  vote_count: number;
68
68
  }
69
+ export interface GuestStar {
70
+ credit_id: string;
71
+ order: number;
72
+ character: string;
73
+ adult: boolean;
74
+ gender: number | null;
75
+ id: number;
76
+ known_for_department: string;
77
+ name: string;
78
+ original_name: string;
79
+ popularity: number;
80
+ profile_path: string | null;
81
+ }
82
+ export interface Episode {
83
+ air_date: string;
84
+ episode_number: number;
85
+ crew: Crew[];
86
+ guest_stars: GuestStar[];
87
+ id: number;
88
+ name: string;
89
+ overview: string;
90
+ production_code: string;
91
+ season_number: number;
92
+ still_path: string;
93
+ vote_average: number;
94
+ vote_count: number;
95
+ show_id: number;
96
+ runtime: number;
97
+ }
98
+ export interface SeasonDetails {
99
+ air_date: string;
100
+ episodes: Episode[];
101
+ name: string;
102
+ overview: string;
103
+ id: number;
104
+ poster_path: string | null;
105
+ season_number: number;
106
+ }
69
107
  export interface TvShowItem {
70
108
  id: string;
71
109
  action: string;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmdb-ts",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "TMDB v3 library wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",