@tdanks2000/tmdb-wrapper 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +334 -148
  2. package/dist/endpoints/collections.js +1 -1
  3. package/dist/endpoints/index.d.ts +3 -0
  4. package/dist/endpoints/index.d.ts.map +1 -1
  5. package/dist/endpoints/index.js +3 -0
  6. package/dist/endpoints/movies.js +1 -1
  7. package/dist/endpoints/tvEpisodes.js +2 -2
  8. package/dist/endpoints/tvSeasons.js +2 -2
  9. package/dist/endpoints/tvShows.js +2 -2
  10. package/dist/endpoints/watchProviders.d.ts +33 -0
  11. package/dist/endpoints/watchProviders.d.ts.map +1 -0
  12. package/dist/endpoints/watchProviders.js +63 -0
  13. package/dist/index.d.ts +4 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +3 -0
  16. package/dist/utils/api.d.ts.map +1 -1
  17. package/dist/utils/getimagePath.d.ts +24 -4
  18. package/dist/utils/getimagePath.d.ts.map +1 -1
  19. package/dist/utils/getimagePath.js +39 -8
  20. package/package.json +59 -41
  21. package/.github/workflows/npm-publish.yml +0 -33
  22. package/src/@types/endpoints/account.ts +0 -17
  23. package/src/@types/endpoints/certification.ts +0 -19
  24. package/src/@types/endpoints/changes.ts +0 -29
  25. package/src/@types/endpoints/collection.ts +0 -23
  26. package/src/@types/endpoints/companies.ts +0 -33
  27. package/src/@types/endpoints/configuration.ts +0 -112
  28. package/src/@types/endpoints/credits.ts +0 -149
  29. package/src/@types/endpoints/discover.ts +0 -87
  30. package/src/@types/endpoints/find.ts +0 -28
  31. package/src/@types/endpoints/genre.ts +0 -3
  32. package/src/@types/endpoints/index.ts +0 -22
  33. package/src/@types/endpoints/keywords.ts +0 -24
  34. package/src/@types/endpoints/movies.ts +0 -169
  35. package/src/@types/endpoints/networks.ts +0 -15
  36. package/src/@types/endpoints/options.ts +0 -189
  37. package/src/@types/endpoints/people.ts +0 -151
  38. package/src/@types/endpoints/review.ts +0 -8
  39. package/src/@types/endpoints/search.ts +0 -39
  40. package/src/@types/endpoints/trending.ts +0 -20
  41. package/src/@types/endpoints/tvEpisode.ts +0 -72
  42. package/src/@types/endpoints/tvSeasons.ts +0 -37
  43. package/src/@types/endpoints/tvShows.ts +0 -284
  44. package/src/@types/endpoints/watchProviders.ts +0 -298
  45. package/src/@types/index.ts +0 -3
  46. package/src/@types/models/baseEndpoint.ts +0 -9
  47. package/src/@types/models/index.ts +0 -1
  48. package/src/@types/types.ts +0 -199
  49. package/src/endpoints/account.ts +0 -22
  50. package/src/endpoints/certification.ts +0 -30
  51. package/src/endpoints/changes.ts +0 -41
  52. package/src/endpoints/collections.ts +0 -57
  53. package/src/endpoints/companies.ts +0 -41
  54. package/src/endpoints/configuration.ts +0 -22
  55. package/src/endpoints/credits.ts +0 -23
  56. package/src/endpoints/discover.ts +0 -40
  57. package/src/endpoints/find.ts +0 -24
  58. package/src/endpoints/genre.ts +0 -32
  59. package/src/endpoints/index.ts +0 -18
  60. package/src/endpoints/keywords.ts +0 -35
  61. package/src/endpoints/movies.ts +0 -244
  62. package/src/endpoints/networks.ts +0 -41
  63. package/src/endpoints/people.ts +0 -147
  64. package/src/endpoints/review.ts +0 -23
  65. package/src/endpoints/search.ts +0 -93
  66. package/src/endpoints/trending.ts +0 -30
  67. package/src/endpoints/tvEpisodes.ts +0 -125
  68. package/src/endpoints/tvSeasons.ts +0 -138
  69. package/src/endpoints/tvShows.ts +0 -286
  70. package/src/index.ts +0 -66
  71. package/src/utils/api.ts +0 -31
  72. package/src/utils/getimagePath.ts +0 -16
  73. package/src/utils/index.ts +0 -2
  74. package/tsconfig.json +0 -101
package/README.md CHANGED
@@ -1,148 +1,334 @@
1
- <h1 align="center">
2
- TMDB Api Wrapper
3
- </h1>
4
-
5
- <p align="center">
6
- <a href="https://www.npmjs.com/package/@tdanks2000/tmdb-wrapper">
7
- <img alt="NPM Version" src="https://img.shields.io/npm/v/%40tdanks2000%2Ftmdb-wrapper">
8
- </a>
9
- <a href="https://github.com/tdanks2000/tmdb-wrapper/blob/master/LICENSE">
10
- <img src="https://img.shields.io/npm/l/@tdanks2000/tmdb-wrapper" alt="GitHub">
11
- </a>
12
- </p>
13
-
14
- <br />
15
-
16
- The TMDB Api Wrapper simplifies the process of making API requests to The Movie Database (TMDb), a comprehensive database for movies and TV shows. It encapsulates functionality related to various API endpoints, such as account, certifications, changes, collections, configuration, credits, discover, find, genres, keywords, movies, people, reviews, search, trending, TV episodes, TV seasons, and TV shows. With this wrapper, developers can quickly integrate TMDB functionality into their TypeScript projects.
17
-
18
- ## Table of Contents
19
-
20
- - [Installation](#installation)
21
- - [Usage](#usage)
22
- - [Authentication](#authentication)
23
- - [Functionality](#functionality)
24
- - [Contributing](#contributing)
25
- - [License](#license)
26
-
27
- ## Installation
28
-
29
- To install the TMDB TypeScript Wrapper, follow these steps:
30
-
31
- 1. Run the following command in your project directory:
32
-
33
- ```typescript
34
- // npm
35
- npm install @tdanks2000/tmdb-wrapper
36
- // yarn
37
- yarn add @tdanks2000/tmdb-wrapper
38
- // pnpm
39
- pnpm i @tdanks2000/tmdb-wrapper
40
- // bun
41
- bun add @tdanks2000/tmdb-wrapper
42
- ```
43
-
44
- ## Usage
45
-
46
- To use the TMDB TypeScript API Wrapper in your TypeScript project, import the necessary classes and functions:
47
-
48
- ```typescript
49
- import { TMDB } from '@tdanks2000/tmdb-wrapper';
50
- ```
51
-
52
- Then, create an instance of the TMDB class, optionally providing an access token. Access tokens can be obtained from [TMDb API Settings](https://www.themoviedb.org/settings/api) under read access token.
53
-
54
- ```typescript
55
- const tmdb = new TMDB('YOUR_ACCESS_TOKEN');
56
- ```
57
-
58
- You can now use the `tmdb` object to access various functionalities of the TMDB API. See the next section for details on available functionality.
59
-
60
- ## Functionality
61
-
62
- The TMDB Api Wrapper provides the following functionality:
63
-
64
- ### Account
65
-
66
- - Manage account details and settings.
67
-
68
- ### Certifications
69
-
70
- - Retrieve certification information for movies.
71
-
72
- ### Changes
73
-
74
- - Get information about changes to the database.
75
-
76
- ### Collections
77
-
78
- - Access information about movie collections.
79
-
80
- ### Configuration
81
-
82
- - Retrieve configuration information for the API.
83
-
84
- ### Credits
85
-
86
- - Get credits information for movies and TV shows.
87
-
88
- ### Discover
89
-
90
- - Discover movies and TV shows based on various criteria.
91
-
92
- ### Find
93
-
94
- - Find movies and TV shows by external IDs.
95
-
96
- ### Genres
97
-
98
- - Retrieve information about movie and TV show genres.
99
-
100
- ### Keywords
101
-
102
- - Access information about movie keywords.
103
-
104
- ### Movies
105
-
106
- - Access information about movies.
107
-
108
- ### People
109
-
110
- - Retrieve information about people involved in movies and TV shows.
111
-
112
- ### Reviews
113
-
114
- - Get reviews for movies and TV shows.
115
-
116
- ### Search
117
-
118
- - Search for movies, TV shows, and people.
119
-
120
- ### Trending
121
-
122
- - Get trending movies and TV shows.
123
-
124
- ### TV Episodes
125
-
126
- - Access information about TV show episodes.
127
-
128
- ### TV Seasons
129
-
130
- - Access information about TV show seasons.
131
-
132
- ### TV Shows
133
-
134
- - Access information about TV shows.
135
-
136
- ## Contributing
137
-
138
- Contributions are welcome! For bug reports, feature requests, or any other questions, please open an issue on the [GitHub repository](https://github.com/tdanks2000/tmdb-wrapper).
139
-
140
- ## License
141
-
142
- This project is licensed under the MIT License - see the [LICENSE](https://github.com/tdanks2000/tmdb-wrapper/blob/main/LICENSE) file for details.
143
-
144
- <br/>
145
-
146
- # ❤️
147
-
148
- Reminder that <strong><i>you are great, you are enough, and your presence is valued.</i></strong> If you are struggling with your mental health, please reach out to someone you love and consult a professional. You are not alone.
1
+ <h1 align="center">
2
+ TMDB Api Wrapper
3
+ </h1>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@tdanks2000/tmdb-wrapper"><img alt="npm version" src="https://img.shields.io/npm/v/@tdanks2000/tmdb-wrapper"></a>
7
+ <a href="https://github.com/tdanks2000/tmdb-wrapper/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/npm/l/@tdanks2000/tmdb-wrapper"></a>
8
+ <a href="https://github.com/tdanks2000/tmdb-wrapper"><img alt="GitHub stars" src="https://img.shields.io/github/stars/tdanks2000/tmdb-wrapper?style=social"></a>
9
+ </p>
10
+
11
+ <br />
12
+
13
+ <p align="center">
14
+ <b>A powerful and easy-to-use TypeScript wrapper for The Movie Database (TMDb) API</b>
15
+ </p>
16
+
17
+ The TMDB Api Wrapper simplifies the process of making API requests to The Movie Database (TMDb), a comprehensive database for movies and TV shows. It encapsulates functionality related to various API endpoints, such as account, certifications, changes, collections, configuration, credits, discover, find, genres, keywords, movies, people, reviews, search, trending, TV episodes, TV seasons, TV shows, companies, networks, and watch providers. With this wrapper, developers can quickly integrate TMDB functionality into their TypeScript projects.
18
+
19
+ ## Table of Contents
20
+
21
+ - [Installation](#installation)
22
+ - [Usage](#usage)
23
+ - [Authentication](#authentication)
24
+ - [Functionality](#functionality)
25
+ - [Movies](#movies)
26
+ - [TV Shows](#tv-shows)
27
+ - [People](#people)
28
+ - [Companies](#companies)
29
+ - [Networks](#networks)
30
+ - [Watch Providers](#watch-providers)
31
+ - [Other Endpoints](#other-endpoints)
32
+ - [Image Handling](#image-handling)
33
+ - [Examples](#examples)
34
+ - [Troubleshooting](#troubleshooting)
35
+ - [API Reference](#api-reference)
36
+ - [Contributing](#contributing)
37
+ - [License](#license)
38
+
39
+ ## Installation
40
+
41
+ To install the TMDB TypeScript Wrapper, follow these steps:
42
+
43
+ 1. Run the following command in your project directory:
44
+
45
+ ```typescript
46
+ // npm
47
+ npm install @tdanks2000/tmdb-wrapper
48
+ // yarn
49
+ yarn add @tdanks2000/tmdb-wrapper
50
+ // pnpm
51
+ pnpm i @tdanks2000/tmdb-wrapper
52
+ // bun
53
+ bun add @tdanks2000/tmdb-wrapper
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ To use the TMDB TypeScript API Wrapper in your TypeScript project, import the necessary classes and functions:
59
+
60
+ ```typescript
61
+ import { TMDB } from '@tdanks2000/tmdb-wrapper';
62
+ ```
63
+
64
+ Then, create an instance of the TMDB class, optionally providing an access token. Access tokens can be obtained from [TMDb API Settings](https://www.themoviedb.org/settings/api) under read access token.
65
+
66
+ ```typescript
67
+ const tmdb = new TMDB('YOUR_ACCESS_TOKEN');
68
+ ```
69
+
70
+ You can now use the `tmdb` object to access various functionalities of the TMDB API. The wrapper provides access to all major TMDB API endpoints including Movies, TV Shows, People, Companies, Networks, and Watch Providers.
71
+
72
+ ## Authentication
73
+
74
+ To use the TMDB API, you need to obtain an API key from [TMDb API Settings](https://www.themoviedb.org/settings/api). The wrapper supports both API key authentication and read access token authentication.
75
+
76
+ ```typescript
77
+ // Using API key
78
+ const tmdb = new TMDB({ apiKey: 'YOUR_API_KEY' });
79
+
80
+ // Using read access token (recommended)
81
+ const tmdb = new TMDB('YOUR_ACCESS_TOKEN');
82
+ ```
83
+
84
+ ## Functionality
85
+
86
+ The TMDB Api Wrapper provides access to the following endpoints:
87
+
88
+ ### Movies
89
+
90
+ Access comprehensive information about movies, including details, credits, reviews, and more.
91
+
92
+ ```typescript
93
+ // Get popular movies
94
+ const popularMovies = await tmdb.movies.getPopular();
95
+
96
+ // Get movie details
97
+ const movieDetails = await tmdb.movies.getDetails(550); // Fight Club
98
+
99
+ // Get movie credits
100
+ const movieCredits = await tmdb.movies.getCredits(550);
101
+ ```
102
+
103
+ ### TV Shows
104
+
105
+ Retrieve information about TV shows, seasons, and episodes.
106
+
107
+ ```typescript
108
+ // Get popular TV shows
109
+ const popularShows = await tmdb.tvShows.getPopular();
110
+
111
+ // Get TV show details
112
+ const showDetails = await tmdb.tvShows.getDetails(1396); // Breaking Bad
113
+
114
+ // Get season details
115
+ const seasonDetails = await tmdb.tvSeasons.getDetails(1396, 1);
116
+
117
+ // Get episode details
118
+ const episodeDetails = await tmdb.tvEpisodes.getDetails(1396, 1, 1);
119
+ ```
120
+
121
+ ### People
122
+
123
+ Access information about actors, directors, and other people involved in movies and TV shows.
124
+
125
+ ```typescript
126
+ // Get popular people
127
+ const popularPeople = await tmdb.people.getPopular();
128
+
129
+ // Get person details
130
+ const personDetails = await tmdb.people.getDetails(287); // Brad Pitt
131
+
132
+ // Get person movie credits
133
+ const personMovieCredits = await tmdb.people.getMovieCredits(287);
134
+ ```
135
+
136
+ ### Companies
137
+
138
+ Retrieve information about production companies.
139
+
140
+ ```typescript
141
+ // Get company details
142
+ const companyDetails = await tmdb.companies.getDetails(1); // Lucasfilm
143
+
144
+ // Get company movies
145
+ const companyMovies = await tmdb.companies.getMovies(1);
146
+ ```
147
+
148
+ ### Networks
149
+
150
+ Access information about TV networks.
151
+
152
+ ```typescript
153
+ // Get network details
154
+ const networkDetails = await tmdb.networks.getDetails(213); // Netflix
155
+
156
+ // Get alternative names
157
+ const alternativeNames = await tmdb.networks.getAlternativeNames(213);
158
+ ```
159
+
160
+ ### Watch Providers
161
+
162
+ Retrieve information about streaming platforms and availability.
163
+
164
+ ```typescript
165
+ // Get available regions
166
+ const regions = await tmdb.watchProviders.getAvailableRegions();
167
+
168
+ // Get movie providers
169
+ const movieProviders = await tmdb.watchProviders.getMovieProviders();
170
+
171
+ // Get TV providers
172
+ const tvProviders = await tmdb.watchProviders.getTvProviders();
173
+ ```
174
+
175
+ ### Other Endpoints
176
+
177
+ The wrapper also provides access to these additional endpoints:
178
+
179
+ - **Account**: Manage account details and settings
180
+ - **Certifications**: Retrieve certification information for movies and TV shows
181
+ - **Changes**: Get information about changes to the database
182
+ - **Collections**: Access information about movie collections
183
+ - **Configuration**: Retrieve configuration information for the API
184
+ - **Credits**: Get credits information for movies and TV shows
185
+ - **Discover**: Discover movies and TV shows based on various criteria
186
+ - **Find**: Find movies and TV shows by external IDs
187
+ - **Genres**: Retrieve information about movie and TV show genres
188
+ - **Keywords**: Access information about movie keywords
189
+ - **Reviews**: Get reviews for movies and TV shows
190
+ - **Search**: Search for movies, TV shows, and people
191
+ - **Trending**: Get trending movies and TV shows
192
+
193
+ ## Image Handling
194
+
195
+ The wrapper provides enhanced utilities for handling TMDB images:
196
+
197
+ ```typescript
198
+ import { getFullImagePath, ImageSizes, ImageFormats } from '@tdanks2000/tmdb-wrapper';
199
+
200
+ // Example usage for movie poster
201
+ const posterUrl = getFullImagePath(
202
+ 'https://image.tmdb.org/t/p/',
203
+ ImageSizes.W500,
204
+ '/wwemzKWzjKYJFfCeiB57q3r4Bcm',
205
+ ImageFormats.JPG
206
+ );
207
+ // Results in: https://image.tmdb.org/t/p/w500/wwemzKWzjKYJFfCeiB57q3r4Bcm.jpg
208
+
209
+ // Example usage for profile image
210
+ const profileUrl = getFullImagePath(
211
+ 'https://image.tmdb.org/t/p/',
212
+ ImageSizes.W185,
213
+ '/5XBzD5WuTyVQZeS4VI25z2moMeY.jpg',
214
+ ImageFormats.JPG
215
+ );
216
+ // Results in: https://image.tmdb.org/t/p/w185/5XBzD5WuTyVQZeS4VI25z2moMeY.jpg
217
+ ```
218
+
219
+ The utility supports all TMDB image sizes and formats:
220
+
221
+ - **Sizes**: W45, W92, W154, W185, W300, W342, W500, W780, W1280, Original
222
+ - **Formats**: JPG, PNG, SVG
223
+
224
+ ## Examples
225
+
226
+ ### Searching for Content
227
+
228
+ ```typescript
229
+ // Search for movies
230
+ const movieResults = await tmdb.search.searchMovies('Inception');
231
+
232
+ // Search for TV shows
233
+ const tvResults = await tmdb.search.searchTvShows('Breaking Bad');
234
+
235
+ // Search for people
236
+ const peopleResults = await tmdb.search.searchPeople('Brad Pitt');
237
+
238
+ // Multi-search (movies, TV shows, and people)
239
+ const multiResults = await tmdb.search.searchMulti('Marvel');
240
+ ```
241
+
242
+ ### Getting Trending Content
243
+
244
+ ```typescript
245
+ // Get trending movies (day)
246
+ const trendingMoviesDay = await tmdb.trending.getTrendingMovies('day');
247
+
248
+ // Get trending TV shows (week)
249
+ const trendingTvWeek = await tmdb.trending.getTrendingTvShows('week');
250
+
251
+ // Get trending people (day)
252
+ const trendingPeopleDay = await tmdb.trending.getTrendingPeople('day');
253
+
254
+ // Get all trending content (week)
255
+ const trendingAllWeek = await tmdb.trending.getTrendingAll('week');
256
+ ```
257
+
258
+ ### Using Discover
259
+
260
+ ```typescript
261
+ // Discover movies by genre
262
+ const actionMovies = await tmdb.discover.discoverMovies({
263
+ with_genres: '28', // Action genre ID
264
+ sort_by: 'popularity.desc'
265
+ });
266
+
267
+ // Discover TV shows by network
268
+ const netflixShows = await tmdb.discover.discoverTvShows({
269
+ with_networks: '213', // Netflix network ID
270
+ sort_by: 'vote_average.desc'
271
+ });
272
+ ```
273
+
274
+ ## Troubleshooting
275
+
276
+ ### Rate Limiting
277
+
278
+ TMDb API has rate limiting in place. If you encounter rate limiting issues, consider implementing a delay between requests or using a caching mechanism.
279
+
280
+ ```typescript
281
+ // Example of implementing a delay between requests
282
+ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
283
+
284
+ async function fetchWithDelay() {
285
+ const result1 = await tmdb.movies.getPopular();
286
+ await delay(250); // Wait 250ms between requests
287
+ const result2 = await tmdb.tvShows.getPopular();
288
+ return { movies: result1, tvShows: result2 };
289
+ }
290
+ ```
291
+
292
+ ### Authentication Issues
293
+
294
+ If you're experiencing authentication issues, ensure your API key or access token is valid and correctly formatted.
295
+
296
+ ```typescript
297
+ // Check if your token is valid
298
+ try {
299
+ const accountDetails = await tmdb.account.getDetails();
300
+ console.log('Authentication successful:', accountDetails);
301
+ } catch (error) {
302
+ console.error('Authentication failed:', error);
303
+ }
304
+ ```
305
+
306
+ ## API Reference
307
+
308
+ For a complete list of available methods and parameters, please refer to the [TMDB API Documentation](https://developers.themoviedb.org/3/getting-started/introduction).
309
+
310
+ This wrapper aims to provide a 1:1 mapping to the official TMDB API, with TypeScript types for improved developer experience.
311
+
312
+ ## Contributing
313
+
314
+ Contributions are welcome! For bug reports, feature requests, or any other questions, please open an issue on the [GitHub repository](https://github.com/tdanks2000/tmdb-wrapper).
315
+
316
+ 1. Fork the repository
317
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
318
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
319
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
320
+ 5. Open a Pull Request
321
+
322
+ ## License
323
+
324
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/tdanks2000/tmdb-wrapper/blob/main/LICENSE) file for details.
325
+
326
+ <br/>
327
+
328
+ # ❤️
329
+
330
+ <p align="center">
331
+ <a target="_blank" href="https://tdanks.com/mental-health/quote">
332
+ ❤️ Reminder that <strong><i>you are great, you are enough, and your presence is valued.</i></strong> If you are struggling with your mental health, please reach out to someone you love and consult a professional. You are not alone. ❤️
333
+ </a>
334
+ </p>
@@ -42,8 +42,8 @@ class CollectionsEndpoint extends _types_1.BaseEndpoint {
42
42
  * @returns {Promise<ImageCollection>} A Promise that resolves with the collection images.
43
43
  */
44
44
  images(id, options) {
45
- var _a;
46
45
  return __awaiter(this, void 0, void 0, function* () {
46
+ var _a;
47
47
  const computedOptions = {
48
48
  include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
49
49
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -2,6 +2,7 @@ export * from './account';
2
2
  export * from './certification';
3
3
  export * from './changes';
4
4
  export * from './collections';
5
+ export * from './companies';
5
6
  export * from './configuration';
6
7
  export * from './credits';
7
8
  export * from './discover';
@@ -9,6 +10,7 @@ export * from './find';
9
10
  export * from './genre';
10
11
  export * from './keywords';
11
12
  export * from './movies';
13
+ export * from './networks';
12
14
  export * from './people';
13
15
  export * from './review';
14
16
  export * from './search';
@@ -16,4 +18,5 @@ export * from './trending';
16
18
  export * from './tvEpisodes';
17
19
  export * from './tvSeasons';
18
20
  export * from './tvShows';
21
+ export * from './watchProviders';
19
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
@@ -18,6 +18,7 @@ __exportStar(require("./account"), exports);
18
18
  __exportStar(require("./certification"), exports);
19
19
  __exportStar(require("./changes"), exports);
20
20
  __exportStar(require("./collections"), exports);
21
+ __exportStar(require("./companies"), exports);
21
22
  __exportStar(require("./configuration"), exports);
22
23
  __exportStar(require("./credits"), exports);
23
24
  __exportStar(require("./discover"), exports);
@@ -25,6 +26,7 @@ __exportStar(require("./find"), exports);
25
26
  __exportStar(require("./genre"), exports);
26
27
  __exportStar(require("./keywords"), exports);
27
28
  __exportStar(require("./movies"), exports);
29
+ __exportStar(require("./networks"), exports);
28
30
  __exportStar(require("./people"), exports);
29
31
  __exportStar(require("./review"), exports);
30
32
  __exportStar(require("./search"), exports);
@@ -32,3 +34,4 @@ __exportStar(require("./trending"), exports);
32
34
  __exportStar(require("./tvEpisodes"), exports);
33
35
  __exportStar(require("./tvSeasons"), exports);
34
36
  __exportStar(require("./tvShows"), exports);
37
+ __exportStar(require("./watchProviders"), exports);
@@ -89,8 +89,8 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
89
89
  * @returns {Promise<Images>} A Promise that resolves with the images of the movie.
90
90
  */
91
91
  images(id, options) {
92
- var _a;
93
92
  return __awaiter(this, void 0, void 0, function* () {
93
+ var _a;
94
94
  const computedOptions = {
95
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
96
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -78,8 +78,8 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
78
78
  * @returns {Promise<Images>} A Promise that resolves with the images for the TV episode.
79
79
  */
80
80
  images(episodeSelection, options) {
81
- var _a;
82
81
  return __awaiter(this, void 0, void 0, function* () {
82
+ var _a;
83
83
  const computedOptions = {
84
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
85
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -104,8 +104,8 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
104
104
  * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV episode.
105
105
  */
106
106
  videos(episodeSelection, options) {
107
- var _a;
108
107
  return __awaiter(this, void 0, void 0, function* () {
108
+ var _a;
109
109
  const computedOptions = {
110
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
111
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -90,8 +90,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
90
90
  * @returns {Promise<Images>} A Promise that resolves with the images for the TV season.
91
91
  */
92
92
  images(seasonSelection, options) {
93
- var _a;
94
93
  return __awaiter(this, void 0, void 0, function* () {
94
+ var _a;
95
95
  const computedOptions = {
96
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
97
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -106,8 +106,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
106
106
  * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV season.
107
107
  */
108
108
  videos(seasonSelection, options) {
109
- var _a;
110
109
  return __awaiter(this, void 0, void 0, function* () {
110
+ var _a;
111
111
  const computedOptions = {
112
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
113
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -133,8 +133,8 @@ class TvShowsEndpoint extends _types_1.BaseEndpoint {
133
133
  * @returns {Promise<Images>} A Promise that resolves with the images of the TV show.
134
134
  */
135
135
  images(id, options) {
136
- var _a;
137
136
  return __awaiter(this, void 0, void 0, function* () {
137
+ var _a;
138
138
  const computedOptions = {
139
139
  include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
140
140
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -212,8 +212,8 @@ class TvShowsEndpoint extends _types_1.BaseEndpoint {
212
212
  * @returns {Promise<Videos>} A Promise that resolves with the videos of the TV show.
213
213
  */
214
214
  videos(id, options) {
215
- var _a;
216
215
  return __awaiter(this, void 0, void 0, function* () {
216
+ var _a;
217
217
  const computedOptions = {
218
218
  include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
219
219
  language: options === null || options === void 0 ? void 0 : options.language,
@@ -0,0 +1,33 @@
1
+ import { BaseEndpoint, WatchProviders } from '../@types';
2
+ /**
3
+ * Represents an endpoint for accessing watch provider information.
4
+ */
5
+ export declare class WatchProvidersEndpoint extends BaseEndpoint {
6
+ protected readonly access_token: string;
7
+ /**
8
+ * Constructs a new WatchProvidersEndpoint instance.
9
+ * @param {string} access_token - The access token used for authentication.
10
+ */
11
+ constructor(access_token: string);
12
+ /**
13
+ * Retrieves a list of all available watch providers (streaming services).
14
+ * @returns {Promise<WatchProviders>} A Promise that resolves with the list of watch providers.
15
+ */
16
+ available(): Promise<WatchProviders>;
17
+ /**
18
+ * Retrieves a list of available regions for watch providers.
19
+ * @returns {Promise<any>} A Promise that resolves with the list of available regions.
20
+ */
21
+ regions(): Promise<any>;
22
+ /**
23
+ * Retrieves a list of watch providers for movies.
24
+ * @returns {Promise<WatchProviders>} A Promise that resolves with the list of movie watch providers.
25
+ */
26
+ movie(): Promise<WatchProviders>;
27
+ /**
28
+ * Retrieves a list of watch providers for TV shows.
29
+ * @returns {Promise<WatchProviders>} A Promise that resolves with the list of TV watch providers.
30
+ */
31
+ tv(): Promise<WatchProviders>;
32
+ }
33
+ //# sourceMappingURL=watchProviders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchProviders.d.ts","sourceRoot":"","sources":["../../src/endpoints/watchProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,YAAY;IAK1C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC;IAI1C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;IAI7B;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,cAAc,CAAC;IAItC;;;OAGG;IACG,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC;CAGpC"}