@tdanks2000/tmdb-wrapper 1.0.3 → 1.1.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 (185) hide show
  1. package/README.md +334 -148
  2. package/dist/endpoints/account.js +2 -13
  3. package/dist/endpoints/certification.js +4 -17
  4. package/dist/endpoints/changes.js +6 -21
  5. package/dist/endpoints/collections.js +10 -26
  6. package/dist/endpoints/companies.js +6 -21
  7. package/dist/endpoints/configuration.js +2 -13
  8. package/dist/endpoints/credits.js +2 -13
  9. package/dist/endpoints/discover.js +4 -17
  10. package/dist/endpoints/find.js +2 -13
  11. package/dist/endpoints/genre.js +4 -17
  12. package/dist/endpoints/index.js +3 -0
  13. package/dist/endpoints/keywords.js +4 -17
  14. package/dist/endpoints/movies.js +48 -98
  15. package/dist/endpoints/networks.js +6 -21
  16. package/dist/endpoints/people.js +26 -57
  17. package/dist/endpoints/review.js +2 -13
  18. package/dist/endpoints/search.js +14 -37
  19. package/dist/endpoints/trending.js +2 -13
  20. package/dist/endpoints/tvEpisodes.js +26 -48
  21. package/dist/endpoints/tvSeasons.js +28 -52
  22. package/dist/endpoints/tvShows.js +58 -115
  23. package/dist/endpoints/watchProviders.js +46 -0
  24. package/dist/index.js +3 -0
  25. package/dist/utils/api.js +12 -23
  26. package/dist/utils/getimagePath.js +39 -8
  27. package/package.json +59 -41
  28. package/.github/workflows/npm-publish.yml +0 -33
  29. package/dist/@types/endpoints/account.d.ts +0 -16
  30. package/dist/@types/endpoints/account.d.ts.map +0 -1
  31. package/dist/@types/endpoints/certification.d.ts +0 -19
  32. package/dist/@types/endpoints/certification.d.ts.map +0 -1
  33. package/dist/@types/endpoints/changes.d.ts +0 -26
  34. package/dist/@types/endpoints/changes.d.ts.map +0 -1
  35. package/dist/@types/endpoints/collection.d.ts +0 -21
  36. package/dist/@types/endpoints/collection.d.ts.map +0 -1
  37. package/dist/@types/endpoints/companies.d.ts +0 -29
  38. package/dist/@types/endpoints/companies.d.ts.map +0 -1
  39. package/dist/@types/endpoints/configuration.d.ts +0 -106
  40. package/dist/@types/endpoints/configuration.d.ts.map +0 -1
  41. package/dist/@types/endpoints/credits.d.ts +0 -135
  42. package/dist/@types/endpoints/credits.d.ts.map +0 -1
  43. package/dist/@types/endpoints/discover.d.ts +0 -68
  44. package/dist/@types/endpoints/discover.d.ts.map +0 -1
  45. package/dist/@types/endpoints/find.d.ts +0 -20
  46. package/dist/@types/endpoints/find.d.ts.map +0 -1
  47. package/dist/@types/endpoints/genre.d.ts +0 -7
  48. package/dist/@types/endpoints/genre.d.ts.map +0 -1
  49. package/dist/@types/endpoints/index.d.ts +0 -23
  50. package/dist/@types/endpoints/index.d.ts.map +0 -1
  51. package/dist/@types/endpoints/keywords.d.ts +0 -21
  52. package/dist/@types/endpoints/keywords.d.ts.map +0 -1
  53. package/dist/@types/endpoints/movies.d.ts +0 -150
  54. package/dist/@types/endpoints/movies.d.ts.map +0 -1
  55. package/dist/@types/endpoints/networks.d.ts +0 -14
  56. package/dist/@types/endpoints/networks.d.ts.map +0 -1
  57. package/dist/@types/endpoints/options.d.ts +0 -73
  58. package/dist/@types/endpoints/options.d.ts.map +0 -1
  59. package/dist/@types/endpoints/people.d.ts +0 -135
  60. package/dist/@types/endpoints/people.d.ts.map +0 -1
  61. package/dist/@types/endpoints/review.d.ts +0 -8
  62. package/dist/@types/endpoints/review.d.ts.map +0 -1
  63. package/dist/@types/endpoints/search.d.ts +0 -32
  64. package/dist/@types/endpoints/search.d.ts.map +0 -1
  65. package/dist/@types/endpoints/trending.d.ts +0 -12
  66. package/dist/@types/endpoints/trending.d.ts.map +0 -1
  67. package/dist/@types/endpoints/tvEpisode.d.ts +0 -65
  68. package/dist/@types/endpoints/tvEpisode.d.ts.map +0 -1
  69. package/dist/@types/endpoints/tvSeasons.d.ts +0 -31
  70. package/dist/@types/endpoints/tvSeasons.d.ts.map +0 -1
  71. package/dist/@types/endpoints/tvShows.d.ts +0 -260
  72. package/dist/@types/endpoints/tvShows.d.ts.map +0 -1
  73. package/dist/@types/endpoints/watchProviders.d.ts +0 -295
  74. package/dist/@types/endpoints/watchProviders.d.ts.map +0 -1
  75. package/dist/@types/index.d.ts +0 -4
  76. package/dist/@types/index.d.ts.map +0 -1
  77. package/dist/@types/models/baseEndpoint.d.ts +0 -7
  78. package/dist/@types/models/baseEndpoint.d.ts.map +0 -1
  79. package/dist/@types/models/index.d.ts +0 -2
  80. package/dist/@types/models/index.d.ts.map +0 -1
  81. package/dist/@types/types.d.ts +0 -174
  82. package/dist/@types/types.d.ts.map +0 -1
  83. package/dist/endpoints/account.d.ts +0 -17
  84. package/dist/endpoints/account.d.ts.map +0 -1
  85. package/dist/endpoints/certification.d.ts +0 -23
  86. package/dist/endpoints/certification.d.ts.map +0 -1
  87. package/dist/endpoints/changes.d.ts +0 -31
  88. package/dist/endpoints/changes.d.ts.map +0 -1
  89. package/dist/endpoints/collections.d.ts +0 -34
  90. package/dist/endpoints/collections.d.ts.map +0 -1
  91. package/dist/endpoints/companies.d.ts +0 -31
  92. package/dist/endpoints/companies.d.ts.map +0 -1
  93. package/dist/endpoints/configuration.d.ts +0 -18
  94. package/dist/endpoints/configuration.d.ts.map +0 -1
  95. package/dist/endpoints/credits.d.ts +0 -19
  96. package/dist/endpoints/credits.d.ts.map +0 -1
  97. package/dist/endpoints/discover.d.ts +0 -24
  98. package/dist/endpoints/discover.d.ts.map +0 -1
  99. package/dist/endpoints/find.d.ts +0 -19
  100. package/dist/endpoints/find.d.ts.map +0 -1
  101. package/dist/endpoints/genre.d.ts +0 -25
  102. package/dist/endpoints/genre.d.ts.map +0 -1
  103. package/dist/endpoints/index.d.ts +0 -19
  104. package/dist/endpoints/index.d.ts.map +0 -1
  105. package/dist/endpoints/keywords.d.ts +0 -25
  106. package/dist/endpoints/keywords.d.ts.map +0 -1
  107. package/dist/endpoints/movies.d.ts +0 -142
  108. package/dist/endpoints/movies.d.ts.map +0 -1
  109. package/dist/endpoints/networks.d.ts +0 -31
  110. package/dist/endpoints/networks.d.ts.map +0 -1
  111. package/dist/endpoints/people.d.ts +0 -84
  112. package/dist/endpoints/people.d.ts.map +0 -1
  113. package/dist/endpoints/review.d.ts +0 -18
  114. package/dist/endpoints/review.d.ts.map +0 -1
  115. package/dist/endpoints/search.d.ts +0 -58
  116. package/dist/endpoints/search.d.ts.map +0 -1
  117. package/dist/endpoints/trending.d.ts +0 -21
  118. package/dist/endpoints/trending.d.ts.map +0 -1
  119. package/dist/endpoints/tvEpisodes.d.ts +0 -61
  120. package/dist/endpoints/tvEpisodes.d.ts.map +0 -1
  121. package/dist/endpoints/tvSeasons.d.ts +0 -70
  122. package/dist/endpoints/tvSeasons.d.ts.map +0 -1
  123. package/dist/endpoints/tvShows.d.ts +0 -164
  124. package/dist/endpoints/tvShows.d.ts.map +0 -1
  125. package/dist/index.d.ts +0 -26
  126. package/dist/index.d.ts.map +0 -1
  127. package/dist/utils/api.d.ts +0 -7
  128. package/dist/utils/api.d.ts.map +0 -1
  129. package/dist/utils/getimagePath.d.ts +0 -12
  130. package/dist/utils/getimagePath.d.ts.map +0 -1
  131. package/dist/utils/index.d.ts +0 -3
  132. package/dist/utils/index.d.ts.map +0 -1
  133. package/src/@types/endpoints/account.ts +0 -17
  134. package/src/@types/endpoints/certification.ts +0 -19
  135. package/src/@types/endpoints/changes.ts +0 -29
  136. package/src/@types/endpoints/collection.ts +0 -23
  137. package/src/@types/endpoints/companies.ts +0 -33
  138. package/src/@types/endpoints/configuration.ts +0 -112
  139. package/src/@types/endpoints/credits.ts +0 -149
  140. package/src/@types/endpoints/discover.ts +0 -87
  141. package/src/@types/endpoints/find.ts +0 -28
  142. package/src/@types/endpoints/genre.ts +0 -3
  143. package/src/@types/endpoints/index.ts +0 -22
  144. package/src/@types/endpoints/keywords.ts +0 -24
  145. package/src/@types/endpoints/movies.ts +0 -169
  146. package/src/@types/endpoints/networks.ts +0 -15
  147. package/src/@types/endpoints/options.ts +0 -189
  148. package/src/@types/endpoints/people.ts +0 -151
  149. package/src/@types/endpoints/review.ts +0 -8
  150. package/src/@types/endpoints/search.ts +0 -39
  151. package/src/@types/endpoints/trending.ts +0 -20
  152. package/src/@types/endpoints/tvEpisode.ts +0 -72
  153. package/src/@types/endpoints/tvSeasons.ts +0 -37
  154. package/src/@types/endpoints/tvShows.ts +0 -284
  155. package/src/@types/endpoints/watchProviders.ts +0 -298
  156. package/src/@types/index.ts +0 -3
  157. package/src/@types/models/baseEndpoint.ts +0 -9
  158. package/src/@types/models/index.ts +0 -1
  159. package/src/@types/types.ts +0 -199
  160. package/src/endpoints/account.ts +0 -22
  161. package/src/endpoints/certification.ts +0 -30
  162. package/src/endpoints/changes.ts +0 -41
  163. package/src/endpoints/collections.ts +0 -57
  164. package/src/endpoints/companies.ts +0 -41
  165. package/src/endpoints/configuration.ts +0 -22
  166. package/src/endpoints/credits.ts +0 -23
  167. package/src/endpoints/discover.ts +0 -40
  168. package/src/endpoints/find.ts +0 -24
  169. package/src/endpoints/genre.ts +0 -32
  170. package/src/endpoints/index.ts +0 -18
  171. package/src/endpoints/keywords.ts +0 -35
  172. package/src/endpoints/movies.ts +0 -244
  173. package/src/endpoints/networks.ts +0 -41
  174. package/src/endpoints/people.ts +0 -147
  175. package/src/endpoints/review.ts +0 -23
  176. package/src/endpoints/search.ts +0 -93
  177. package/src/endpoints/trending.ts +0 -30
  178. package/src/endpoints/tvEpisodes.ts +0 -125
  179. package/src/endpoints/tvSeasons.ts +0 -138
  180. package/src/endpoints/tvShows.ts +0 -286
  181. package/src/index.ts +0 -66
  182. package/src/utils/api.ts +0 -31
  183. package/src/utils/getimagePath.ts +0 -16
  184. package/src/utils/index.ts +0 -2
  185. package/tsconfig.json +0 -101
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.PeopleEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -30,14 +21,12 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
30
21
  * @param {string} [language] - Optional parameter for specifying the language.
31
22
  * @returns {Promise<AppendToResponse<PersonDetails, AppendToResponsePersonKey[], 'person'>>} A Promise that resolves with the details of the person.
32
23
  */
33
- details(id, appendToResponse, language) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const options = {
36
- append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
37
- language: language,
38
- };
39
- return yield this.api.get(`${BASE_PERSON}/${id}`, options);
40
- });
24
+ async details(id, appendToResponse, language) {
25
+ const options = {
26
+ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
27
+ language: language,
28
+ };
29
+ return await this.api.get(`${BASE_PERSON}/${id}`, options);
41
30
  }
42
31
  /**
43
32
  * Retrieves changes made to a specific person asynchronously.
@@ -45,10 +34,8 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
45
34
  * @param {ChangeOption} [options] - Optional parameters for filtering changes.
46
35
  * @returns {Promise<Changes<PersonChangeValue>>} A Promise that resolves with the changes made to the person.
47
36
  */
48
- changes(id, options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- return yield this.api.get(`${BASE_PERSON}/${id}/changes`, options);
51
- });
37
+ async changes(id, options) {
38
+ return await this.api.get(`${BASE_PERSON}/${id}/changes`, options);
52
39
  }
53
40
  /**
54
41
  * Retrieves movie credits of a specific person asynchronously.
@@ -56,10 +43,8 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
56
43
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
57
44
  * @returns {Promise<PersonMovieCredit>} A Promise that resolves with the movie credits of the person.
58
45
  */
59
- movieCredits(id, options) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return yield this.api.get(`${BASE_PERSON}/${id}/movie_credits`, options);
62
- });
46
+ async movieCredits(id, options) {
47
+ return await this.api.get(`${BASE_PERSON}/${id}/movie_credits`, options);
63
48
  }
64
49
  /**
65
50
  * Retrieves TV show credits of a specific person asynchronously.
@@ -67,10 +52,8 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
67
52
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
68
53
  * @returns {Promise<PersonTvShowCredit>} A Promise that resolves with the TV show credits of the person.
69
54
  */
70
- tvShowCredits(id, options) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- return yield this.api.get(`${BASE_PERSON}/${id}/tv_credits`, options);
73
- });
55
+ async tvShowCredits(id, options) {
56
+ return await this.api.get(`${BASE_PERSON}/${id}/tv_credits`, options);
74
57
  }
75
58
  /**
76
59
  * Retrieves combined credits of a specific person asynchronously.
@@ -78,30 +61,24 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
78
61
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
79
62
  * @returns {Promise<PersonCombinedCredits>} A Promise that resolves with the combined credits of the person.
80
63
  */
81
- combinedCredits(id, options) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- return yield this.api.get(`${BASE_PERSON}/${id}/combined_credits`, options);
84
- });
64
+ async combinedCredits(id, options) {
65
+ return await this.api.get(`${BASE_PERSON}/${id}/combined_credits`, options);
85
66
  }
86
67
  /**
87
68
  * Retrieves external IDs of a specific person asynchronously.
88
69
  * @param {number} id - The ID of the person.
89
70
  * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the person.
90
71
  */
91
- externalId(id) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- return yield this.api.get(`${BASE_PERSON}/${id}/external_ids`);
94
- });
72
+ async externalId(id) {
73
+ return await this.api.get(`${BASE_PERSON}/${id}/external_ids`);
95
74
  }
96
75
  /**
97
76
  * Retrieves images of a specific person asynchronously.
98
77
  * @param {number} id - The ID of the person.
99
78
  * @returns {Promise<PeopleImages>} A Promise that resolves with the images of the person.
100
79
  */
101
- images(id) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- return yield this.api.get(`${BASE_PERSON}/${id}/images`);
104
- });
80
+ async images(id) {
81
+ return await this.api.get(`${BASE_PERSON}/${id}/images`);
105
82
  }
106
83
  /**
107
84
  * Retrieves tagged images of a specific person asynchronously.
@@ -109,39 +86,31 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
109
86
  * @param {PageOption} [options] - Optional parameters for specifying pagination options.
110
87
  * @returns {Promise<TaggedImages>} A Promise that resolves with the tagged images of the person.
111
88
  */
112
- taggedImages(id, options) {
113
- return __awaiter(this, void 0, void 0, function* () {
114
- return yield this.api.get(`${BASE_PERSON}/${id}/tagged_images`, options);
115
- });
89
+ async taggedImages(id, options) {
90
+ return await this.api.get(`${BASE_PERSON}/${id}/tagged_images`, options);
116
91
  }
117
92
  /**
118
93
  * Retrieves translations of a specific person asynchronously.
119
94
  * @param {number} id - The ID of the person.
120
95
  * @returns {Promise<PersonTranslations>} A Promise that resolves with the translations of the person.
121
96
  */
122
- translation(id) {
123
- return __awaiter(this, void 0, void 0, function* () {
124
- return yield this.api.get(`${BASE_PERSON}/${id}/translations`);
125
- });
97
+ async translation(id) {
98
+ return await this.api.get(`${BASE_PERSON}/${id}/translations`);
126
99
  }
127
100
  /**
128
101
  * Retrieves details of the latest person asynchronously.
129
102
  * @returns {Promise<PersonDetails>} A Promise that resolves with the details of the latest person.
130
103
  */
131
- latest() {
132
- return __awaiter(this, void 0, void 0, function* () {
133
- return yield this.api.get(`${BASE_PERSON}/latest`);
134
- });
104
+ async latest() {
105
+ return await this.api.get(`${BASE_PERSON}/latest`);
135
106
  }
136
107
  /**
137
108
  * Retrieves popular persons asynchronously.
138
109
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
139
110
  * @returns {Promise<PopularPersons>} A Promise that resolves with the popular persons.
140
111
  */
141
- popular(options) {
142
- return __awaiter(this, void 0, void 0, function* () {
143
- return yield this.api.get(`${BASE_PERSON}/popular`, options);
144
- });
112
+ async popular(options) {
113
+ return await this.api.get(`${BASE_PERSON}/popular`, options);
145
114
  }
146
115
  }
147
116
  exports.PeopleEndpoint = PeopleEndpoint;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.ReviewEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -27,10 +18,8 @@ class ReviewEndpoint extends _types_1.BaseEndpoint {
27
18
  * @param {string} id - The ID of the review.
28
19
  * @returns {Promise<ReviewDetails>} A Promise that resolves with the details of the review.
29
20
  */
30
- details(id) {
31
- return __awaiter(this, void 0, void 0, function* () {
32
- return yield this.api.get(`/review/${id}`);
33
- });
21
+ async details(id) {
22
+ return await this.api.get(`/review/${id}`);
34
23
  }
35
24
  }
36
25
  exports.ReviewEndpoint = ReviewEndpoint;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.SearchEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -29,70 +20,56 @@ class SearchEndpoint extends _types_1.BaseEndpoint {
29
20
  * @param {SearchOptions} options - The search options.
30
21
  * @returns {Promise<Search<Company>>} A Promise that resolves with the search results for companies.
31
22
  */
32
- companies(options) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- return yield this.api.get(`${BASE_SEARCH}/company`, options);
35
- });
23
+ async companies(options) {
24
+ return await this.api.get(`${BASE_SEARCH}/company`, options);
36
25
  }
37
26
  /**
38
27
  * Searches for collections asynchronously.
39
28
  * @param {SearchOptions} options - The search options.
40
29
  * @returns {Promise<Search<Collection>>} A Promise that resolves with the search results for collections.
41
30
  */
42
- collections(options) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- return yield this.api.get(`${BASE_SEARCH}/collection`, options);
45
- });
31
+ async collections(options) {
32
+ return await this.api.get(`${BASE_SEARCH}/collection`, options);
46
33
  }
47
34
  /**
48
35
  * Searches for keywords asynchronously.
49
36
  * @param {SearchOptions} options - The search options.
50
37
  * @returns {Promise<Search<{ id: string; name: string }>>} A Promise that resolves with the search results for keywords.
51
38
  */
52
- keywords(options) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return yield this.api.get(`${BASE_SEARCH}/keyword`, options);
55
- });
39
+ async keywords(options) {
40
+ return await this.api.get(`${BASE_SEARCH}/keyword`, options);
56
41
  }
57
42
  /**
58
43
  * Searches for movies asynchronously.
59
44
  * @param {MovieSearchOptions} options - The search options.
60
45
  * @returns {Promise<Search<Movie>>} A Promise that resolves with the search results for movies.
61
46
  */
62
- movies(options) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- return yield this.api.get(`${BASE_SEARCH}/movie`, options);
65
- });
47
+ async movies(options) {
48
+ return await this.api.get(`${BASE_SEARCH}/movie`, options);
66
49
  }
67
50
  /**
68
51
  * Searches for people asynchronously.
69
52
  * @param {PeopleSearchOptions} options - The search options.
70
53
  * @returns {Promise<Search<Person>>} A Promise that resolves with the search results for people.
71
54
  */
72
- people(options) {
73
- return __awaiter(this, void 0, void 0, function* () {
74
- return yield this.api.get(`${BASE_SEARCH}/person`, options);
75
- });
55
+ async people(options) {
56
+ return await this.api.get(`${BASE_SEARCH}/person`, options);
76
57
  }
77
58
  /**
78
59
  * Searches for TV shows asynchronously.
79
60
  * @param {TvSearchOptions} options - The search options.
80
61
  * @returns {Promise<Search<TV>>} A Promise that resolves with the search results for TV shows.
81
62
  */
82
- tv(options) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- return yield this.api.get(`${BASE_SEARCH}/tv`, options);
85
- });
63
+ async tv(options) {
64
+ return await this.api.get(`${BASE_SEARCH}/tv`, options);
86
65
  }
87
66
  /**
88
67
  * Performs a multi-search asynchronously.
89
68
  * @param {MultiSearchOptions} options - The search options.
90
69
  * @returns {Promise<Search<MultiSearchResult>>} A Promise that resolves with the multi-search results.
91
70
  */
92
- multi(options) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- return yield this.api.get(`${BASE_SEARCH}/multi`, options);
95
- });
71
+ async multi(options) {
72
+ return await this.api.get(`${BASE_SEARCH}/multi`, options);
96
73
  }
97
74
  }
98
75
  exports.SearchEndpoint = SearchEndpoint;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.TrendingEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -30,10 +21,8 @@ class TrendingEndpoint extends _types_1.BaseEndpoint {
30
21
  * @returns {Promise<TrendingResults<T>>} A Promise that resolves with the trending results.
31
22
  * @template T - The type of media being searched for (e.g., 'movie', 'tv').
32
23
  */
33
- trending(mediaType, timeWindow, options) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- return yield this.api.get(`/trending/${mediaType}/${timeWindow}`, options);
36
- });
24
+ async trending(mediaType, timeWindow, options) {
25
+ return await this.api.get(`/trending/${mediaType}/${timeWindow}`, options);
37
26
  }
38
27
  }
39
28
  exports.TrendingEndpoint = TrendingEndpoint;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.TvEpisodesEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -33,11 +24,12 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
33
24
  * @returns {Promise<AppendToResponse<Omit<Episode, 'show_id'>, AppendToResponseTvEpisodeKey[], 'tvEpisode'>>}
34
25
  * A Promise that resolves with the details of the TV episode.
35
26
  */
36
- details(episodeSelection, appendToResponse, options) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- const combinedOptions = Object.assign({ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined }, options);
39
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}`, combinedOptions);
40
- });
27
+ async details(episodeSelection, appendToResponse, options) {
28
+ const combinedOptions = {
29
+ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
30
+ ...options,
31
+ };
32
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}`, combinedOptions);
41
33
  }
42
34
  /**
43
35
  * Retrieves changes related to a specific TV episode asynchronously.
@@ -45,10 +37,8 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
45
37
  * @param {ChangeOption} [options] - Optional parameters for specifying changes.
46
38
  * @returns {Promise<Changes<TvEpisodeChangeValue>>} A Promise that resolves with the changes related to the TV episode.
47
39
  */
48
- changes(episodeID, options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- return yield this.api.get(`/tv/episode/${episodeID}/changes`, options);
51
- });
40
+ async changes(episodeID, options) {
41
+ return await this.api.get(`/tv/episode/${episodeID}/changes`, options);
52
42
  }
53
43
  /**
54
44
  * Retrieves credits for a specific TV episode asynchronously.
@@ -56,20 +46,16 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
56
46
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
57
47
  * @returns {Promise<TvEpisodeCredit>} A Promise that resolves with the credits for the TV episode.
58
48
  */
59
- credits(episodeSelection, options) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}/credits`, options);
62
- });
49
+ async credits(episodeSelection, options) {
50
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}/credits`, options);
63
51
  }
64
52
  /**
65
53
  * Retrieves external IDs for a specific TV episode asynchronously.
66
54
  * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
67
55
  * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs for the TV episode.
68
56
  */
69
- externalIds(episodeSelection) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}/external_ids`);
72
- });
57
+ async externalIds(episodeSelection) {
58
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}/external_ids`);
73
59
  }
74
60
  /**
75
61
  * Retrieves images for a specific TV episode asynchronously.
@@ -77,25 +63,20 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
77
63
  * @param {TvEpisodeImageSearchOptions} [options] - Optional parameters for specifying image search options.
78
64
  * @returns {Promise<Images>} A Promise that resolves with the images for the TV episode.
79
65
  */
80
- images(episodeSelection, options) {
81
- var _a;
82
- return __awaiter(this, void 0, void 0, function* () {
83
- const computedOptions = {
84
- include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
85
- language: options === null || options === void 0 ? void 0 : options.language,
86
- };
87
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}/images`, computedOptions);
88
- });
66
+ async images(episodeSelection, options) {
67
+ const computedOptions = {
68
+ include_image_language: options?.include_image_language?.join(','),
69
+ language: options?.language,
70
+ };
71
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}/images`, computedOptions);
89
72
  }
90
73
  /**
91
74
  * Retrieves translations for a specific TV episode asynchronously.
92
75
  * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
93
76
  * @returns {Promise<TvEpisodeTranslations>} A Promise that resolves with the translations for the TV episode.
94
77
  */
95
- translations(episodeSelection) {
96
- return __awaiter(this, void 0, void 0, function* () {
97
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}/translations`);
98
- });
78
+ async translations(episodeSelection) {
79
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}/translations`);
99
80
  }
100
81
  /**
101
82
  * Retrieves videos for a specific TV episode asynchronously.
@@ -103,15 +84,12 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
103
84
  * @param {TvEpisodeVideoSearchOptions} [options] - Optional parameters for specifying video search options.
104
85
  * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV episode.
105
86
  */
106
- videos(episodeSelection, options) {
107
- var _a;
108
- return __awaiter(this, void 0, void 0, function* () {
109
- const computedOptions = {
110
- include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
111
- language: options === null || options === void 0 ? void 0 : options.language,
112
- };
113
- return yield this.api.get(`${BASE_EPISODE(episodeSelection)}/videos`, computedOptions);
114
- });
87
+ async videos(episodeSelection, options) {
88
+ const computedOptions = {
89
+ include_video_language: options?.include_video_language?.join(','),
90
+ language: options?.language,
91
+ };
92
+ return await this.api.get(`${BASE_EPISODE(episodeSelection)}/videos`, computedOptions);
115
93
  }
116
94
  }
117
95
  exports.TvEpisodesEndpoint = TvEpisodesEndpoint;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.TvSeasonsEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -33,11 +24,12 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
33
24
  * @returns {Promise<AppendToResponse<SeasonDetails, AppendToResponseTvSeasonKey[], 'tvSeason'>>}
34
25
  * A Promise that resolves with the details of the TV season.
35
26
  */
36
- details(seasonSelection, appendToResponse, options) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- const combinedOptions = Object.assign({ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined }, options);
39
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}`, combinedOptions);
40
- });
27
+ async details(seasonSelection, appendToResponse, options) {
28
+ const combinedOptions = {
29
+ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
30
+ ...options,
31
+ };
32
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}`, combinedOptions);
41
33
  }
42
34
  /**
43
35
  * Retrieves aggregate credits for a specific TV season asynchronously.
@@ -45,10 +37,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
45
37
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
46
38
  * @returns {Promise<AggregateCredits>} A Promise that resolves with the aggregate credits for the TV season.
47
39
  */
48
- aggregateCredits(seasonSelection, options) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/aggregate_credits`, options);
51
- });
40
+ async aggregateCredits(seasonSelection, options) {
41
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/aggregate_credits`, options);
52
42
  }
53
43
  /**
54
44
  * Retrieves changes related to a specific TV season asynchronously.
@@ -56,10 +46,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
56
46
  * @param {ChangeOption} [options] - Optional parameters for specifying changes.
57
47
  * @returns {Promise<Changes<TvSeasonChangeValue>>} A Promise that resolves with the changes related to the TV season.
58
48
  */
59
- changes(seasonId, options) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return yield this.api.get(`/tv/season/${seasonId}/changes`, options);
62
- });
49
+ async changes(seasonId, options) {
50
+ return await this.api.get(`/tv/season/${seasonId}/changes`, options);
63
51
  }
64
52
  /**
65
53
  * Retrieves credits for a specific TV season asynchronously.
@@ -67,10 +55,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
67
55
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
68
56
  * @returns {Promise<Credits>} A Promise that resolves with the credits for the TV season.
69
57
  */
70
- credits(seasonSelection, options) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/credits`, options);
73
- });
58
+ async credits(seasonSelection, options) {
59
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/credits`, options);
74
60
  }
75
61
  /**
76
62
  * Retrieves external IDs for a specific TV season asynchronously.
@@ -78,10 +64,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
78
64
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
79
65
  * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs for the TV season.
80
66
  */
81
- externalIds(seasonSelection, options) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/external_ids`, options);
84
- });
67
+ async externalIds(seasonSelection, options) {
68
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/external_ids`, options);
85
69
  }
86
70
  /**
87
71
  * Retrieves images for a specific TV season asynchronously.
@@ -89,15 +73,12 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
89
73
  * @param {TvSeasonImageSearchOptions} [options] - Optional parameters for specifying image search options.
90
74
  * @returns {Promise<Images>} A Promise that resolves with the images for the TV season.
91
75
  */
92
- images(seasonSelection, options) {
93
- var _a;
94
- return __awaiter(this, void 0, void 0, function* () {
95
- const computedOptions = {
96
- include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
97
- language: options === null || options === void 0 ? void 0 : options.language,
98
- };
99
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/images`, computedOptions);
100
- });
76
+ async images(seasonSelection, options) {
77
+ const computedOptions = {
78
+ include_image_language: options?.include_image_language?.join(','),
79
+ language: options?.language,
80
+ };
81
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/images`, computedOptions);
101
82
  }
102
83
  /**
103
84
  * Retrieves videos for a specific TV season asynchronously.
@@ -105,15 +86,12 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
105
86
  * @param {TvSeasonVideoSearchOptions} [options] - Optional parameters for specifying video search options.
106
87
  * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV season.
107
88
  */
108
- videos(seasonSelection, options) {
109
- var _a;
110
- return __awaiter(this, void 0, void 0, function* () {
111
- const computedOptions = {
112
- include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
113
- language: options === null || options === void 0 ? void 0 : options.language,
114
- };
115
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/videos`, computedOptions);
116
- });
89
+ async videos(seasonSelection, options) {
90
+ const computedOptions = {
91
+ include_video_language: options?.include_video_language?.join(','),
92
+ language: options?.language,
93
+ };
94
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/videos`, computedOptions);
117
95
  }
118
96
  /**
119
97
  * Retrieves translations for a specific TV season asynchronously.
@@ -121,10 +99,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
121
99
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
122
100
  * @returns {Promise<Translations>} A Promise that resolves with the translations for the TV season.
123
101
  */
124
- translations(seasonSelection, options) {
125
- return __awaiter(this, void 0, void 0, function* () {
126
- return yield this.api.get(`${BASE_SEASON(seasonSelection)}/translations`, options);
127
- });
102
+ async translations(seasonSelection, options) {
103
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/translations`, options);
128
104
  }
129
105
  }
130
106
  exports.TvSeasonsEndpoint = TvSeasonsEndpoint;