@tdanks2000/tmdb-wrapper 1.1.0 → 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 (129) hide show
  1. package/dist/endpoints/account.js +2 -13
  2. package/dist/endpoints/certification.js +4 -17
  3. package/dist/endpoints/changes.js +6 -21
  4. package/dist/endpoints/collections.js +10 -26
  5. package/dist/endpoints/companies.js +6 -21
  6. package/dist/endpoints/configuration.js +2 -13
  7. package/dist/endpoints/credits.js +2 -13
  8. package/dist/endpoints/discover.js +4 -17
  9. package/dist/endpoints/find.js +2 -13
  10. package/dist/endpoints/genre.js +4 -17
  11. package/dist/endpoints/keywords.js +4 -17
  12. package/dist/endpoints/movies.js +48 -98
  13. package/dist/endpoints/networks.js +6 -21
  14. package/dist/endpoints/people.js +26 -57
  15. package/dist/endpoints/review.js +2 -13
  16. package/dist/endpoints/search.js +14 -37
  17. package/dist/endpoints/trending.js +2 -13
  18. package/dist/endpoints/tvEpisodes.js +26 -48
  19. package/dist/endpoints/tvSeasons.js +28 -52
  20. package/dist/endpoints/tvShows.js +58 -115
  21. package/dist/endpoints/watchProviders.js +8 -25
  22. package/dist/utils/api.js +12 -23
  23. package/package.json +2 -2
  24. package/dist/@types/endpoints/account.d.ts +0 -16
  25. package/dist/@types/endpoints/account.d.ts.map +0 -1
  26. package/dist/@types/endpoints/certification.d.ts +0 -19
  27. package/dist/@types/endpoints/certification.d.ts.map +0 -1
  28. package/dist/@types/endpoints/changes.d.ts +0 -26
  29. package/dist/@types/endpoints/changes.d.ts.map +0 -1
  30. package/dist/@types/endpoints/collection.d.ts +0 -21
  31. package/dist/@types/endpoints/collection.d.ts.map +0 -1
  32. package/dist/@types/endpoints/companies.d.ts +0 -29
  33. package/dist/@types/endpoints/companies.d.ts.map +0 -1
  34. package/dist/@types/endpoints/configuration.d.ts +0 -106
  35. package/dist/@types/endpoints/configuration.d.ts.map +0 -1
  36. package/dist/@types/endpoints/credits.d.ts +0 -135
  37. package/dist/@types/endpoints/credits.d.ts.map +0 -1
  38. package/dist/@types/endpoints/discover.d.ts +0 -68
  39. package/dist/@types/endpoints/discover.d.ts.map +0 -1
  40. package/dist/@types/endpoints/find.d.ts +0 -20
  41. package/dist/@types/endpoints/find.d.ts.map +0 -1
  42. package/dist/@types/endpoints/genre.d.ts +0 -7
  43. package/dist/@types/endpoints/genre.d.ts.map +0 -1
  44. package/dist/@types/endpoints/index.d.ts +0 -23
  45. package/dist/@types/endpoints/index.d.ts.map +0 -1
  46. package/dist/@types/endpoints/keywords.d.ts +0 -21
  47. package/dist/@types/endpoints/keywords.d.ts.map +0 -1
  48. package/dist/@types/endpoints/movies.d.ts +0 -150
  49. package/dist/@types/endpoints/movies.d.ts.map +0 -1
  50. package/dist/@types/endpoints/networks.d.ts +0 -14
  51. package/dist/@types/endpoints/networks.d.ts.map +0 -1
  52. package/dist/@types/endpoints/options.d.ts +0 -73
  53. package/dist/@types/endpoints/options.d.ts.map +0 -1
  54. package/dist/@types/endpoints/people.d.ts +0 -135
  55. package/dist/@types/endpoints/people.d.ts.map +0 -1
  56. package/dist/@types/endpoints/review.d.ts +0 -8
  57. package/dist/@types/endpoints/review.d.ts.map +0 -1
  58. package/dist/@types/endpoints/search.d.ts +0 -32
  59. package/dist/@types/endpoints/search.d.ts.map +0 -1
  60. package/dist/@types/endpoints/trending.d.ts +0 -12
  61. package/dist/@types/endpoints/trending.d.ts.map +0 -1
  62. package/dist/@types/endpoints/tvEpisode.d.ts +0 -65
  63. package/dist/@types/endpoints/tvEpisode.d.ts.map +0 -1
  64. package/dist/@types/endpoints/tvSeasons.d.ts +0 -31
  65. package/dist/@types/endpoints/tvSeasons.d.ts.map +0 -1
  66. package/dist/@types/endpoints/tvShows.d.ts +0 -260
  67. package/dist/@types/endpoints/tvShows.d.ts.map +0 -1
  68. package/dist/@types/endpoints/watchProviders.d.ts +0 -295
  69. package/dist/@types/endpoints/watchProviders.d.ts.map +0 -1
  70. package/dist/@types/index.d.ts +0 -4
  71. package/dist/@types/index.d.ts.map +0 -1
  72. package/dist/@types/models/baseEndpoint.d.ts +0 -7
  73. package/dist/@types/models/baseEndpoint.d.ts.map +0 -1
  74. package/dist/@types/models/index.d.ts +0 -2
  75. package/dist/@types/models/index.d.ts.map +0 -1
  76. package/dist/@types/types.d.ts +0 -174
  77. package/dist/@types/types.d.ts.map +0 -1
  78. package/dist/endpoints/account.d.ts +0 -17
  79. package/dist/endpoints/account.d.ts.map +0 -1
  80. package/dist/endpoints/certification.d.ts +0 -23
  81. package/dist/endpoints/certification.d.ts.map +0 -1
  82. package/dist/endpoints/changes.d.ts +0 -31
  83. package/dist/endpoints/changes.d.ts.map +0 -1
  84. package/dist/endpoints/collections.d.ts +0 -34
  85. package/dist/endpoints/collections.d.ts.map +0 -1
  86. package/dist/endpoints/companies.d.ts +0 -31
  87. package/dist/endpoints/companies.d.ts.map +0 -1
  88. package/dist/endpoints/configuration.d.ts +0 -18
  89. package/dist/endpoints/configuration.d.ts.map +0 -1
  90. package/dist/endpoints/credits.d.ts +0 -19
  91. package/dist/endpoints/credits.d.ts.map +0 -1
  92. package/dist/endpoints/discover.d.ts +0 -24
  93. package/dist/endpoints/discover.d.ts.map +0 -1
  94. package/dist/endpoints/find.d.ts +0 -19
  95. package/dist/endpoints/find.d.ts.map +0 -1
  96. package/dist/endpoints/genre.d.ts +0 -25
  97. package/dist/endpoints/genre.d.ts.map +0 -1
  98. package/dist/endpoints/index.d.ts +0 -22
  99. package/dist/endpoints/index.d.ts.map +0 -1
  100. package/dist/endpoints/keywords.d.ts +0 -25
  101. package/dist/endpoints/keywords.d.ts.map +0 -1
  102. package/dist/endpoints/movies.d.ts +0 -142
  103. package/dist/endpoints/movies.d.ts.map +0 -1
  104. package/dist/endpoints/networks.d.ts +0 -31
  105. package/dist/endpoints/networks.d.ts.map +0 -1
  106. package/dist/endpoints/people.d.ts +0 -84
  107. package/dist/endpoints/people.d.ts.map +0 -1
  108. package/dist/endpoints/review.d.ts +0 -18
  109. package/dist/endpoints/review.d.ts.map +0 -1
  110. package/dist/endpoints/search.d.ts +0 -58
  111. package/dist/endpoints/search.d.ts.map +0 -1
  112. package/dist/endpoints/trending.d.ts +0 -21
  113. package/dist/endpoints/trending.d.ts.map +0 -1
  114. package/dist/endpoints/tvEpisodes.d.ts +0 -61
  115. package/dist/endpoints/tvEpisodes.d.ts.map +0 -1
  116. package/dist/endpoints/tvSeasons.d.ts +0 -70
  117. package/dist/endpoints/tvSeasons.d.ts.map +0 -1
  118. package/dist/endpoints/tvShows.d.ts +0 -164
  119. package/dist/endpoints/tvShows.d.ts.map +0 -1
  120. package/dist/endpoints/watchProviders.d.ts +0 -33
  121. package/dist/endpoints/watchProviders.d.ts.map +0 -1
  122. package/dist/index.d.ts +0 -29
  123. package/dist/index.d.ts.map +0 -1
  124. package/dist/utils/api.d.ts +0 -7
  125. package/dist/utils/api.d.ts.map +0 -1
  126. package/dist/utils/getimagePath.d.ts +0 -32
  127. package/dist/utils/getimagePath.d.ts.map +0 -1
  128. package/dist/utils/index.d.ts +0 -3
  129. package/dist/utils/index.d.ts.map +0 -1
@@ -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.MoviesEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -31,24 +22,20 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
31
22
  * @param {string} [language] - Optional parameter for specifying the language.
32
23
  * @returns {Promise<AppendToResponse<MovieDetails, AppendToResponseMovieKey[], 'movie'>>} A Promise that resolves with the details of the movie.
33
24
  */
34
- details(id, appendToResponse, language) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const options = {
37
- append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
38
- language: language,
39
- };
40
- return yield this.api.get(`${BASE_MOVIE}/${id}`, options);
41
- });
25
+ async details(id, appendToResponse, language) {
26
+ const options = {
27
+ append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
28
+ language: language,
29
+ };
30
+ return await this.api.get(`${BASE_MOVIE}/${id}`, options);
42
31
  }
43
32
  /**
44
33
  * Retrieves alternative titles of a specific movie asynchronously.
45
34
  * @param {number} id - The ID of the movie.
46
35
  * @returns {Promise<AlternativeTitles>} A Promise that resolves with the alternative titles of the movie.
47
36
  */
48
- alternativeTitles(id) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- return yield this.api.get(`${BASE_MOVIE}/${id}/alternative_titles`);
51
- });
37
+ async alternativeTitles(id) {
38
+ return await this.api.get(`${BASE_MOVIE}/${id}/alternative_titles`);
52
39
  }
53
40
  /**
54
41
  * Retrieves changes made to a specific movie asynchronously.
@@ -56,10 +43,8 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
56
43
  * @param {ChangeOption} [options] - Optional parameters for filtering changes.
57
44
  * @returns {Promise<Changes<MovieChangeValue>>} A Promise that resolves with the changes made to the movie.
58
45
  */
59
- changes(id, options) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return yield this.api.get(`${BASE_MOVIE}/${id}/changes`, options);
62
- });
46
+ async changes(id, options) {
47
+ return await this.api.get(`${BASE_MOVIE}/${id}/changes`, options);
63
48
  }
64
49
  /**
65
50
  * Retrieves credits of a specific movie asynchronously.
@@ -67,20 +52,16 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
67
52
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
68
53
  * @returns {Promise<Credits>} A Promise that resolves with the credits of the movie.
69
54
  */
70
- credits(id, options) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- return yield this.api.get(`${BASE_MOVIE}/${id}/credits`, options);
73
- });
55
+ async credits(id, options) {
56
+ return await this.api.get(`${BASE_MOVIE}/${id}/credits`, options);
74
57
  }
75
58
  /**
76
59
  * Retrieves external IDs of a specific movie asynchronously.
77
60
  * @param {number} id - The ID of the movie.
78
61
  * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the movie.
79
62
  */
80
- externalIds(id) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- return yield this.api.get(`${BASE_MOVIE}/${id}/external_ids`);
83
- });
63
+ async externalIds(id) {
64
+ return await this.api.get(`${BASE_MOVIE}/${id}/external_ids`);
84
65
  }
85
66
  /**
86
67
  * Retrieves images of a specific movie asynchronously.
@@ -88,25 +69,20 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
88
69
  * @param {MoviesImageSearchOptions} [options] - Optional parameters for specifying image search options.
89
70
  * @returns {Promise<Images>} A Promise that resolves with the images of the movie.
90
71
  */
91
- images(id, options) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- var _a;
94
- const computedOptions = {
95
- include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
96
- language: options === null || options === void 0 ? void 0 : options.language,
97
- };
98
- return yield this.api.get(`${BASE_MOVIE}/${id}/images`, computedOptions);
99
- });
72
+ async images(id, options) {
73
+ const computedOptions = {
74
+ include_image_language: options?.include_image_language?.join(','),
75
+ language: options?.language,
76
+ };
77
+ return await this.api.get(`${BASE_MOVIE}/${id}/images`, computedOptions);
100
78
  }
101
79
  /**
102
80
  * Retrieves keywords of a specific movie asynchronously.
103
81
  * @param {number} id - The ID of the movie.
104
82
  * @returns {Promise<Keywords>} A Promise that resolves with the keywords of the movie.
105
83
  */
106
- keywords(id) {
107
- return __awaiter(this, void 0, void 0, function* () {
108
- return yield this.api.get(`${BASE_MOVIE}/${id}/keywords`);
109
- });
84
+ async keywords(id) {
85
+ return await this.api.get(`${BASE_MOVIE}/${id}/keywords`);
110
86
  }
111
87
  /**
112
88
  * Retrieves lists containing a specific movie asynchronously.
@@ -114,10 +90,8 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
114
90
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
115
91
  * @returns {Promise<MovieLists>} A Promise that resolves with the lists containing the movie.
116
92
  */
117
- lists(id, options) {
118
- return __awaiter(this, void 0, void 0, function* () {
119
- return yield this.api.get(`${BASE_MOVIE}/${id}/lists`, options);
120
- });
93
+ async lists(id, options) {
94
+ return await this.api.get(`${BASE_MOVIE}/${id}/lists`, options);
121
95
  }
122
96
  /**
123
97
  * Retrieves recommendations for a specific movie asynchronously.
@@ -125,20 +99,16 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
125
99
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
126
100
  * @returns {Promise<Recommendations>} A Promise that resolves with the recommendations for the movie.
127
101
  */
128
- recommendations(id, options) {
129
- return __awaiter(this, void 0, void 0, function* () {
130
- return yield this.api.get(`${BASE_MOVIE}/${id}/recommendations`, options);
131
- });
102
+ async recommendations(id, options) {
103
+ return await this.api.get(`${BASE_MOVIE}/${id}/recommendations`, options);
132
104
  }
133
105
  /**
134
106
  * Retrieves release dates of a specific movie asynchronously.
135
107
  * @param {number} id - The ID of the movie.
136
108
  * @returns {Promise<ReleaseDates>} A Promise that resolves with the release dates of the movie.
137
109
  */
138
- releaseDates(id) {
139
- return __awaiter(this, void 0, void 0, function* () {
140
- return yield this.api.get(`${BASE_MOVIE}/${id}/release_dates`);
141
- });
110
+ async releaseDates(id) {
111
+ return await this.api.get(`${BASE_MOVIE}/${id}/release_dates`);
142
112
  }
143
113
  /**
144
114
  * Retrieves reviews for a specific movie asynchronously.
@@ -146,10 +116,8 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
146
116
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
147
117
  * @returns {Promise<Reviews>} A Promise that resolves with the reviews for the movie.
148
118
  */
149
- reviews(id, options) {
150
- return __awaiter(this, void 0, void 0, function* () {
151
- return yield this.api.get(`${BASE_MOVIE}/${id}/reviews`, options);
152
- });
119
+ async reviews(id, options) {
120
+ return await this.api.get(`${BASE_MOVIE}/${id}/reviews`, options);
153
121
  }
154
122
  /**
155
123
  * Retrieves similar movies for a specific movie asynchronously.
@@ -157,20 +125,16 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
157
125
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
158
126
  * @returns {Promise<SimilarMovies>} A Promise that resolves with the similar movies for the movie.
159
127
  */
160
- similar(id, options) {
161
- return __awaiter(this, void 0, void 0, function* () {
162
- return yield this.api.get(`${BASE_MOVIE}/${id}/similar`, options);
163
- });
128
+ async similar(id, options) {
129
+ return await this.api.get(`${BASE_MOVIE}/${id}/similar`, options);
164
130
  }
165
131
  /**
166
132
  * Retrieves translations of a specific movie asynchronously.
167
133
  * @param {number} id - The ID of the movie.
168
134
  * @returns {Promise<Translations>} A Promise that resolves with the translations of the movie.
169
135
  */
170
- translations(id) {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- return yield this.api.get(`${BASE_MOVIE}/${id}/translations`);
173
- });
136
+ async translations(id) {
137
+ return await this.api.get(`${BASE_MOVIE}/${id}/translations`);
174
138
  }
175
139
  /**
176
140
  * Retrieves videos of a specific movie asynchronously.
@@ -178,69 +142,55 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
178
142
  * @param {LanguageOption} [options] - Optional parameters for specifying the language.
179
143
  * @returns {Promise<Videos>} A Promise that resolves with the videos of the movie.
180
144
  */
181
- videos(id, options) {
182
- return __awaiter(this, void 0, void 0, function* () {
183
- return yield this.api.get(`${BASE_MOVIE}/${id}/videos`, options);
184
- });
145
+ async videos(id, options) {
146
+ return await this.api.get(`${BASE_MOVIE}/${id}/videos`, options);
185
147
  }
186
148
  /**
187
149
  * Retrieves watch providers of a specific movie asynchronously.
188
150
  * @param {number} id - The ID of the movie.
189
151
  * @returns {Promise<WatchProviders>} A Promise that resolves with the watch providers of the movie.
190
152
  */
191
- watchProviders(id) {
192
- return __awaiter(this, void 0, void 0, function* () {
193
- return yield this.api.get(`${BASE_MOVIE}/${id}/watch/providers`);
194
- });
153
+ async watchProviders(id) {
154
+ return await this.api.get(`${BASE_MOVIE}/${id}/watch/providers`);
195
155
  }
196
156
  /**
197
157
  * Retrieves details of the latest movie asynchronously.
198
158
  * @returns {Promise<LatestMovie>} A Promise that resolves with the details of the latest movie.
199
159
  */
200
- latest() {
201
- return __awaiter(this, void 0, void 0, function* () {
202
- return yield this.api.get(`${BASE_MOVIE}/latest`);
203
- });
160
+ async latest() {
161
+ return await this.api.get(`${BASE_MOVIE}/latest`);
204
162
  }
205
163
  /**
206
164
  * Retrieves movies playing now asynchronously.
207
165
  * @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
208
166
  * @returns {Promise<MoviesPlayingNow>} A Promise that resolves with the movies playing now.
209
167
  */
210
- nowPlaying(options) {
211
- return __awaiter(this, void 0, void 0, function* () {
212
- return yield this.api.get(`${BASE_MOVIE}/now_playing`, options);
213
- });
168
+ async nowPlaying(options) {
169
+ return await this.api.get(`${BASE_MOVIE}/now_playing`, options);
214
170
  }
215
171
  /**
216
172
  * Retrieves popular movies asynchronously.
217
173
  * @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
218
174
  * @returns {Promise<PopularMovies>} A Promise that resolves with the popular movies.
219
175
  */
220
- popular(options) {
221
- return __awaiter(this, void 0, void 0, function* () {
222
- return yield this.api.get(`${BASE_MOVIE}/popular`, options);
223
- });
176
+ async popular(options) {
177
+ return await this.api.get(`${BASE_MOVIE}/popular`, options);
224
178
  }
225
179
  /**
226
180
  * Retrieves top rated movies asynchronously.
227
181
  * @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
228
182
  * @returns {Promise<TopRatedMovies>} A Promise that resolves with the top rated movies.
229
183
  */
230
- topRated(options) {
231
- return __awaiter(this, void 0, void 0, function* () {
232
- return yield this.api.get(`${BASE_MOVIE}/top_rated`, options);
233
- });
184
+ async topRated(options) {
185
+ return await this.api.get(`${BASE_MOVIE}/top_rated`, options);
234
186
  }
235
187
  /**
236
188
  * Retrieves upcoming movies asynchronously.
237
189
  * @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
238
190
  * @returns {Promise<UpcomingMovies>} A Promise that resolves with the upcoming movies.
239
191
  */
240
- upcoming(options) {
241
- return __awaiter(this, void 0, void 0, function* () {
242
- return yield this.api.get(`${BASE_MOVIE}/upcoming`, options);
243
- });
192
+ async upcoming(options) {
193
+ return await this.api.get(`${BASE_MOVIE}/upcoming`, options);
244
194
  }
245
195
  }
246
196
  exports.MoviesEndpoint = MoviesEndpoint;
@@ -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.NetworksEndpoint = void 0;
13
4
  const _types_1 = require("../@types");
@@ -28,30 +19,24 @@ class NetworksEndpoint extends _types_1.BaseEndpoint {
28
19
  * @param {number} id - The ID of the network.
29
20
  * @returns {Promise<NetworkDetails>} A Promise that resolves with the details of the network.
30
21
  */
31
- details(id) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- return yield this.api.get(`/network/${id}`);
34
- });
22
+ async details(id) {
23
+ return await this.api.get(`/network/${id}`);
35
24
  }
36
25
  /**
37
26
  * Retrieves alternative names of a specific network asynchronously.
38
27
  * @param {number} id - The ID of the network.
39
28
  * @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the network.
40
29
  */
41
- alternativeNames(id) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- return yield this.api.get(`/network/${id}/alternative_names`);
44
- });
30
+ async alternativeNames(id) {
31
+ return await this.api.get(`/network/${id}/alternative_names`);
45
32
  }
46
33
  /**
47
34
  * Retrieves images of a specific network asynchronously.
48
35
  * @param {number} id - The ID of the network.
49
36
  * @returns {Promise<NetworkImages>} A Promise that resolves with the images of the network.
50
37
  */
51
- images(id) {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- return yield this.api.get(`/network/${id}/images`);
54
- });
38
+ async images(id) {
39
+ return await this.api.get(`/network/${id}/images`);
55
40
  }
56
41
  }
57
42
  exports.NetworksEndpoint = NetworksEndpoint;
@@ -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;