@tdanks2000/tmdb-wrapper 1.0.0 → 1.0.2

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 (112) hide show
  1. package/README.md +11 -0
  2. package/dist/@types/endpoints/configuration.d.ts +1 -0
  3. package/dist/@types/endpoints/configuration.d.ts.map +1 -1
  4. package/dist/@types/endpoints/discover.d.ts +53 -0
  5. package/dist/@types/endpoints/discover.d.ts.map +1 -1
  6. package/dist/@types/endpoints/genre.d.ts +7 -0
  7. package/dist/@types/endpoints/genre.d.ts.map +1 -0
  8. package/dist/@types/endpoints/genre.js +2 -0
  9. package/dist/@types/endpoints/index.d.ts +1 -0
  10. package/dist/@types/endpoints/index.d.ts.map +1 -1
  11. package/dist/@types/endpoints/index.js +1 -0
  12. package/dist/@types/endpoints/movies.d.ts +7 -1
  13. package/dist/@types/endpoints/movies.d.ts.map +1 -1
  14. package/dist/@types/endpoints/search.d.ts +24 -1
  15. package/dist/@types/endpoints/search.d.ts.map +1 -1
  16. package/dist/@types/endpoints/tvEpisode.d.ts +13 -1
  17. package/dist/@types/endpoints/tvEpisode.d.ts.map +1 -1
  18. package/dist/@types/endpoints/tvSeasons.d.ts +13 -1
  19. package/dist/@types/endpoints/tvSeasons.d.ts.map +1 -1
  20. package/dist/@types/models/baseEndpoint.d.ts +1 -1
  21. package/dist/@types/models/baseEndpoint.js +1 -1
  22. package/dist/endpoints/account.d.ts +12 -1
  23. package/dist/endpoints/account.d.ts.map +1 -1
  24. package/dist/endpoints/account.js +12 -1
  25. package/dist/endpoints/certification.d.ts +16 -1
  26. package/dist/endpoints/certification.d.ts.map +1 -1
  27. package/dist/endpoints/certification.js +16 -1
  28. package/dist/endpoints/changes.d.ts +23 -1
  29. package/dist/endpoints/changes.d.ts.map +1 -1
  30. package/dist/endpoints/changes.js +26 -4
  31. package/dist/endpoints/collections.d.ts +26 -1
  32. package/dist/endpoints/collections.d.ts.map +1 -1
  33. package/dist/endpoints/collections.js +26 -1
  34. package/dist/endpoints/companies.d.ts +23 -1
  35. package/dist/endpoints/companies.d.ts.map +1 -1
  36. package/dist/endpoints/companies.js +23 -1
  37. package/dist/endpoints/configuration.d.ts +12 -1
  38. package/dist/endpoints/configuration.d.ts.map +1 -1
  39. package/dist/endpoints/configuration.js +12 -1
  40. package/dist/endpoints/credits.d.ts +13 -1
  41. package/dist/endpoints/credits.d.ts.map +1 -1
  42. package/dist/endpoints/credits.js +13 -1
  43. package/dist/endpoints/discover.d.ts +18 -55
  44. package/dist/endpoints/discover.d.ts.map +1 -1
  45. package/dist/endpoints/discover.js +18 -1
  46. package/dist/endpoints/find.d.ts +14 -1
  47. package/dist/endpoints/find.d.ts.map +1 -1
  48. package/dist/endpoints/find.js +14 -1
  49. package/dist/endpoints/genre.d.ts +18 -7
  50. package/dist/endpoints/genre.d.ts.map +1 -1
  51. package/dist/endpoints/genre.js +18 -1
  52. package/dist/endpoints/keywords.d.ts +19 -1
  53. package/dist/endpoints/keywords.d.ts.map +1 -1
  54. package/dist/endpoints/keywords.js +22 -4
  55. package/dist/endpoints/movies.d.ts +115 -9
  56. package/dist/endpoints/movies.d.ts.map +1 -1
  57. package/dist/endpoints/movies.js +115 -3
  58. package/dist/endpoints/networks.d.ts +23 -1
  59. package/dist/endpoints/networks.d.ts.map +1 -1
  60. package/dist/endpoints/networks.js +23 -1
  61. package/dist/endpoints/people.d.ts +69 -1
  62. package/dist/endpoints/people.d.ts.map +1 -1
  63. package/dist/endpoints/people.js +69 -1
  64. package/dist/endpoints/review.d.ts +13 -1
  65. package/dist/endpoints/review.d.ts.map +1 -1
  66. package/dist/endpoints/review.js +13 -1
  67. package/dist/endpoints/search.d.ts +43 -24
  68. package/dist/endpoints/search.d.ts.map +1 -1
  69. package/dist/endpoints/search.js +43 -1
  70. package/dist/endpoints/trending.d.ts +17 -2
  71. package/dist/endpoints/trending.d.ts.map +1 -1
  72. package/dist/endpoints/trending.js +16 -1
  73. package/dist/endpoints/tvEpisodes.d.ts +48 -11
  74. package/dist/endpoints/tvEpisodes.d.ts.map +1 -1
  75. package/dist/endpoints/tvEpisodes.js +50 -1
  76. package/dist/endpoints/tvSeasons.d.ts +56 -11
  77. package/dist/endpoints/tvSeasons.d.ts.map +1 -1
  78. package/dist/endpoints/tvSeasons.js +58 -1
  79. package/dist/endpoints/tvShows.d.ts +135 -4
  80. package/dist/endpoints/tvShows.d.ts.map +1 -1
  81. package/dist/endpoints/tvShows.js +134 -3
  82. package/dist/index.d.ts +1 -1
  83. package/dist/index.js +1 -1
  84. package/package.json +4 -3
  85. package/src/@types/endpoints/configuration.ts +1 -0
  86. package/src/@types/endpoints/discover.ts +56 -0
  87. package/src/@types/endpoints/genre.ts +3 -0
  88. package/src/@types/endpoints/index.ts +1 -0
  89. package/src/@types/endpoints/movies.ts +8 -1
  90. package/src/@types/endpoints/search.ts +30 -1
  91. package/src/@types/endpoints/tvEpisode.ts +15 -1
  92. package/src/@types/endpoints/tvSeasons.ts +15 -1
  93. package/src/endpoints/account.ts +11 -0
  94. package/src/endpoints/certification.ts +15 -0
  95. package/src/endpoints/changes.ts +25 -3
  96. package/src/endpoints/collections.ts +25 -0
  97. package/src/endpoints/companies.ts +22 -0
  98. package/src/endpoints/configuration.ts +11 -0
  99. package/src/endpoints/credits.ts +12 -0
  100. package/src/endpoints/discover.ts +24 -57
  101. package/src/endpoints/find.ts +13 -0
  102. package/src/endpoints/genre.ts +18 -5
  103. package/src/endpoints/keywords.ts +21 -3
  104. package/src/endpoints/movies.ts +114 -8
  105. package/src/endpoints/networks.ts +22 -0
  106. package/src/endpoints/people.ts +68 -0
  107. package/src/endpoints/review.ts +12 -0
  108. package/src/endpoints/search.ts +47 -32
  109. package/src/endpoints/trending.ts +17 -2
  110. package/src/endpoints/tvEpisodes.ts +50 -13
  111. package/src/endpoints/tvSeasons.ts +58 -13
  112. package/src/endpoints/tvShows.ts +138 -3
@@ -11,7 +11,9 @@ import {
11
11
  LanguageOption,
12
12
  TvEpisodeChangeValue,
13
13
  TvEpisodeCredit,
14
+ TvEpisodeImageSearchOptions,
14
15
  TvEpisodeTranslations,
16
+ TvEpisodeVideoSearchOptions,
15
17
  Videos,
16
18
  } from '@/@types';
17
19
 
@@ -19,25 +21,26 @@ const BASE_EPISODE = (episodeSelection: EpisodeSelection): string => {
19
21
  return `/tv/${episodeSelection.tvShowID}/season/${episodeSelection.seasonNumber}/episode/${episodeSelection.episodeNumber}`;
20
22
  };
21
23
 
22
- export interface TvEpisodeImageSearchOptions extends LanguageOption {
23
- /**
24
- * a list of ISO-639-1 values to query
25
- */
26
- include_image_language?: string[];
27
- }
28
-
29
- export interface TvEpisodeVideoSearchOptions extends LanguageOption {
24
+ /**
25
+ * Represents an endpoint for accessing TV episode-related information.
26
+ */
27
+ export class TvEpisodesEndpoint extends BaseEndpoint {
30
28
  /**
31
- * a list of ISO-639-1 values to query
29
+ * Constructs a new TvEpisodesEndpoint instance.
30
+ * @param {string} access_token - The access token used for authentication.
32
31
  */
33
- include_video_language?: string[];
34
- }
35
-
36
- export class TvEpisodesEndpoint extends BaseEndpoint {
37
32
  constructor(access_token: string) {
38
33
  super(access_token);
39
34
  }
40
35
 
36
+ /**
37
+ * Retrieves details of a specific TV episode asynchronously.
38
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
39
+ * @param {AppendToResponseTvEpisodeKey[]} [appendToResponse] - Additional data to append to the response.
40
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
41
+ * @returns {Promise<AppendToResponse<Omit<Episode, 'show_id'>, AppendToResponseTvEpisodeKey[], 'tvEpisode'>>}
42
+ * A Promise that resolves with the details of the TV episode.
43
+ */
41
44
  async details<T extends AppendToResponseTvEpisodeKey[] | undefined>(
42
45
  episodeSelection: EpisodeSelection,
43
46
  appendToResponse?: T,
@@ -54,18 +57,41 @@ export class TvEpisodesEndpoint extends BaseEndpoint {
54
57
  );
55
58
  }
56
59
 
60
+ /**
61
+ * Retrieves changes related to a specific TV episode asynchronously.
62
+ * @param {number} episodeID - The ID of the TV episode.
63
+ * @param {ChangeOption} [options] - Optional parameters for specifying changes.
64
+ * @returns {Promise<Changes<TvEpisodeChangeValue>>} A Promise that resolves with the changes related to the TV episode.
65
+ */
57
66
  async changes(episodeID: number, options?: ChangeOption) {
58
67
  return await this.api.get<Changes<TvEpisodeChangeValue>>(`/tv/episode/${episodeID}/changes`, options);
59
68
  }
60
69
 
70
+ /**
71
+ * Retrieves credits for a specific TV episode asynchronously.
72
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
73
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
74
+ * @returns {Promise<TvEpisodeCredit>} A Promise that resolves with the credits for the TV episode.
75
+ */
61
76
  async credits(episodeSelection: EpisodeSelection, options?: LanguageOption) {
62
77
  return await this.api.get<TvEpisodeCredit>(`${BASE_EPISODE(episodeSelection)}/credits`, options);
63
78
  }
64
79
 
80
+ /**
81
+ * Retrieves external IDs for a specific TV episode asynchronously.
82
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
83
+ * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs for the TV episode.
84
+ */
65
85
  async externalIds(episodeSelection: EpisodeSelection) {
66
86
  return await this.api.get<ExternalIds>(`${BASE_EPISODE(episodeSelection)}/external_ids`);
67
87
  }
68
88
 
89
+ /**
90
+ * Retrieves images for a specific TV episode asynchronously.
91
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
92
+ * @param {TvEpisodeImageSearchOptions} [options] - Optional parameters for specifying image search options.
93
+ * @returns {Promise<Images>} A Promise that resolves with the images for the TV episode.
94
+ */
69
95
  async images(episodeSelection: EpisodeSelection, options?: TvEpisodeImageSearchOptions) {
70
96
  const computedOptions = {
71
97
  include_image_language: options?.include_image_language?.join(','),
@@ -74,10 +100,21 @@ export class TvEpisodesEndpoint extends BaseEndpoint {
74
100
  return await this.api.get<Images>(`${BASE_EPISODE(episodeSelection)}/images`, computedOptions);
75
101
  }
76
102
 
103
+ /**
104
+ * Retrieves translations for a specific TV episode asynchronously.
105
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
106
+ * @returns {Promise<TvEpisodeTranslations>} A Promise that resolves with the translations for the TV episode.
107
+ */
77
108
  async translations(episodeSelection: EpisodeSelection) {
78
109
  return await this.api.get<TvEpisodeTranslations>(`${BASE_EPISODE(episodeSelection)}/translations`);
79
110
  }
80
111
 
112
+ /**
113
+ * Retrieves videos for a specific TV episode asynchronously.
114
+ * @param {EpisodeSelection} episodeSelection - The selection criteria for the TV episode.
115
+ * @param {TvEpisodeVideoSearchOptions} [options] - Optional parameters for specifying video search options.
116
+ * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV episode.
117
+ */
81
118
  async videos(episodeSelection: EpisodeSelection, options?: TvEpisodeVideoSearchOptions) {
82
119
  const computedOptions = {
83
120
  include_video_language: options?.include_video_language?.join(','),
@@ -13,6 +13,8 @@ import {
13
13
  SeasonSelection,
14
14
  Translations,
15
15
  TvSeasonChangeValue,
16
+ TvSeasonImageSearchOptions,
17
+ TvSeasonVideoSearchOptions,
16
18
  Videos,
17
19
  } from '@/@types';
18
20
 
@@ -20,25 +22,26 @@ const BASE_SEASON = (seasonSelection: SeasonSelection): string => {
20
22
  return `/tv/${seasonSelection.tvShowID}/season/${seasonSelection.seasonNumber}`;
21
23
  };
22
24
 
23
- export interface TvSeasonImageSearchOptions extends LanguageOption {
24
- /**
25
- * a list of ISO-639-1 values to query
26
- */
27
- include_image_language?: string[];
28
- }
29
-
30
- export interface TvSeasonVideoSearchOptions extends LanguageOption {
25
+ /**
26
+ * Represents an endpoint for accessing TV season-related information.
27
+ */
28
+ export class TvSeasonsEndpoint extends BaseEndpoint {
31
29
  /**
32
- * a list of ISO-639-1 values to query
30
+ * Constructs a new TvSeasonsEndpoint instance.
31
+ * @param {string} access_token - The access token used for authentication.
33
32
  */
34
- include_video_language?: string[];
35
- }
36
-
37
- export class TvSeasonsEndpoint extends BaseEndpoint {
38
33
  constructor(access_token: string) {
39
34
  super(access_token);
40
35
  }
41
36
 
37
+ /**
38
+ * Retrieves details of a specific TV season asynchronously.
39
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
40
+ * @param {AppendToResponseTvSeasonKey[]} [appendToResponse] - Additional data to append to the response.
41
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
42
+ * @returns {Promise<AppendToResponse<SeasonDetails, AppendToResponseTvSeasonKey[], 'tvSeason'>>}
43
+ * A Promise that resolves with the details of the TV season.
44
+ */
42
45
  async details<T extends AppendToResponseTvSeasonKey[] | undefined>(
43
46
  seasonSelection: SeasonSelection,
44
47
  appendToResponse?: T,
@@ -55,22 +58,52 @@ export class TvSeasonsEndpoint extends BaseEndpoint {
55
58
  );
56
59
  }
57
60
 
61
+ /**
62
+ * Retrieves aggregate credits for a specific TV season asynchronously.
63
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
64
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
65
+ * @returns {Promise<AggregateCredits>} A Promise that resolves with the aggregate credits for the TV season.
66
+ */
58
67
  async aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption) {
59
68
  return await this.api.get<AggregateCredits>(`${BASE_SEASON(seasonSelection)}/aggregate_credits`, options);
60
69
  }
61
70
 
71
+ /**
72
+ * Retrieves changes related to a specific TV season asynchronously.
73
+ * @param {number} seasonId - The ID of the TV season.
74
+ * @param {ChangeOption} [options] - Optional parameters for specifying changes.
75
+ * @returns {Promise<Changes<TvSeasonChangeValue>>} A Promise that resolves with the changes related to the TV season.
76
+ */
62
77
  async changes(seasonId: number, options?: ChangeOption) {
63
78
  return await this.api.get<Changes<TvSeasonChangeValue>>(`/tv/season/${seasonId}/changes`, options);
64
79
  }
65
80
 
81
+ /**
82
+ * Retrieves credits for a specific TV season asynchronously.
83
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
84
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
85
+ * @returns {Promise<Credits>} A Promise that resolves with the credits for the TV season.
86
+ */
66
87
  async credits(seasonSelection: SeasonSelection, options?: LanguageOption) {
67
88
  return await this.api.get<Credits>(`${BASE_SEASON(seasonSelection)}/credits`, options);
68
89
  }
69
90
 
91
+ /**
92
+ * Retrieves external IDs for a specific TV season asynchronously.
93
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
94
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
95
+ * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs for the TV season.
96
+ */
70
97
  async externalIds(seasonSelection: SeasonSelection, options?: LanguageOption) {
71
98
  return await this.api.get<ExternalIds>(`${BASE_SEASON(seasonSelection)}/external_ids`, options);
72
99
  }
73
100
 
101
+ /**
102
+ * Retrieves images for a specific TV season asynchronously.
103
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
104
+ * @param {TvSeasonImageSearchOptions} [options] - Optional parameters for specifying image search options.
105
+ * @returns {Promise<Images>} A Promise that resolves with the images for the TV season.
106
+ */
74
107
  async images(seasonSelection: SeasonSelection, options?: TvSeasonImageSearchOptions) {
75
108
  const computedOptions = {
76
109
  include_image_language: options?.include_image_language?.join(','),
@@ -79,6 +112,12 @@ export class TvSeasonsEndpoint extends BaseEndpoint {
79
112
  return await this.api.get<Images>(`${BASE_SEASON(seasonSelection)}/images`, computedOptions);
80
113
  }
81
114
 
115
+ /**
116
+ * Retrieves videos for a specific TV season asynchronously.
117
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
118
+ * @param {TvSeasonVideoSearchOptions} [options] - Optional parameters for specifying video search options.
119
+ * @returns {Promise<Videos>} A Promise that resolves with the videos for the TV season.
120
+ */
82
121
  async videos(seasonSelection: SeasonSelection, options?: TvSeasonVideoSearchOptions) {
83
122
  const computedOptions = {
84
123
  include_video_language: options?.include_video_language?.join(','),
@@ -87,6 +126,12 @@ export class TvSeasonsEndpoint extends BaseEndpoint {
87
126
  return await this.api.get<Videos>(`${BASE_SEASON(seasonSelection)}/videos`, computedOptions);
88
127
  }
89
128
 
129
+ /**
130
+ * Retrieves translations for a specific TV season asynchronously.
131
+ * @param {SeasonSelection} seasonSelection - The selection criteria for the TV season.
132
+ * @param {LanguageOption} [options] - Optional parameters for specifying the language.
133
+ * @returns {Promise<Translations>} A Promise that resolves with the translations for the TV season.
134
+ */
90
135
  async translations(seasonSelection: SeasonSelection, options?: LanguageOption) {
91
136
  return await this.api.get<Translations>(`${BASE_SEASON(seasonSelection)}/translations`, options);
92
137
  }
@@ -36,12 +36,31 @@ import {
36
36
 
37
37
  const BASE_TV = '/tv';
38
38
 
39
+ /**
40
+ * Represents an endpoint for accessing TV show-related information.
41
+ */
39
42
  export class TvShowsEndpoint extends BaseEndpoint {
43
+ /**
44
+ * Constructs a new TvShowsEndpoint instance.
45
+ * @param {string} access_token - The access token used for authentication.
46
+ */
40
47
  constructor(protected readonly access_token: string) {
41
48
  super(access_token);
42
49
  }
43
50
 
44
- async details<T extends AppendToResponseTvKey[] | undefined>(id: number, appendToResponse?: T, language?: string) {
51
+ /**
52
+ * Retrieves details of a specific TV show asynchronously.
53
+ * @param {number} id - The ID of the TV show.
54
+ * @param {AppendToResponseTvKey[]} [appendToResponse] - Additional data to append to the response.
55
+ * @param {string} [language] - The language for the response.
56
+ * @returns {Promise<AppendToResponse<TvShowDetails, AppendToResponseTvKey[], 'tvShow'>>}
57
+ * A Promise that resolves with the details of the TV show.
58
+ */
59
+ async details<T extends AppendToResponseTvKey[] | undefined>(
60
+ id: number,
61
+ appendToResponse?: T,
62
+ language?: string,
63
+ ): Promise<AppendToResponse<TvShowDetails, T, 'tvShow'>> {
45
64
  const options = {
46
65
  append_to_response: appendToResponse ? appendToResponse.join(',') : undefined,
47
66
  language: language,
@@ -49,38 +68,89 @@ export class TvShowsEndpoint extends BaseEndpoint {
49
68
  return await this.api.get<AppendToResponse<TvShowDetails, T, 'tvShow'>>(`${BASE_TV}/${id}`, options);
50
69
  }
51
70
 
71
+ /**
72
+ * Retrieves alternative titles of a specific TV show asynchronously.
73
+ * @param {number} id - The ID of the TV show.
74
+ * @returns {Promise<AlternativeTitles>} A Promise that resolves with the alternative titles of the TV show.
75
+ */
52
76
  async alternativeTitles(id: number): Promise<AlternativeTitles> {
53
77
  return await this.api.get<AlternativeTitles>(`${BASE_TV}/${id}/alternative_titles`);
54
78
  }
55
79
 
80
+ /**
81
+ * Retrieves changes for a specific TV show asynchronously.
82
+ * @param {number} id - The ID of the TV show.
83
+ * @param {ChangeOption} [options] - Additional options for the request.
84
+ * @returns {Promise<Changes<TvShowChangeValue>>}
85
+ * A Promise that resolves with the changes for the TV show.
86
+ */
56
87
  async changes(id: number, options?: ChangeOption): Promise<Changes<TvShowChangeValue>> {
57
88
  return await this.api.get<Changes<TvShowChangeValue>>(`${BASE_TV}/${id}/changes`, options);
58
89
  }
59
90
 
91
+ /**
92
+ * Retrieves content ratings for a specific TV show asynchronously.
93
+ * @param {number} id - The ID of the TV show.
94
+ * @returns {Promise<ContentRatings>} A Promise that resolves with the content ratings of the TV show.
95
+ */
60
96
  async contentRatings(id: number): Promise<ContentRatings> {
61
97
  return await this.api.get<ContentRatings>(`${BASE_TV}/${id}/content_ratings`);
62
98
  }
63
99
 
100
+ /**
101
+ * Retrieves aggregate credits for a specific TV show asynchronously.
102
+ * @param {number} id - The ID of the TV show.
103
+ * @param {LanguageOption} [options] - Additional options for the request.
104
+ * @returns {Promise<AggregateCredits>} A Promise that resolves with the aggregate credits of the TV show.
105
+ */
64
106
  async aggregateCredits(id: number, options?: LanguageOption): Promise<AggregateCredits> {
65
107
  return await this.api.get<AggregateCredits>(`${BASE_TV}/${id}/aggregate_credits`, options);
66
108
  }
67
109
 
110
+ /**
111
+ * Retrieves credits for a specific TV show asynchronously.
112
+ * @param {number} id - The ID of the TV show.
113
+ * @param {LanguageOption} [options] - Additional options for the request.
114
+ * @returns {Promise<Credits>} A Promise that resolves with the credits of the TV show.
115
+ */
68
116
  async credits(id: number, options?: LanguageOption): Promise<Credits> {
69
117
  return await this.api.get<Credits>(`${BASE_TV}/${id}/credits`, options);
70
118
  }
71
119
 
120
+ /**
121
+ * Retrieves details of a specific season of a TV show asynchronously.
122
+ * @param {number} tvId - The ID of the TV show.
123
+ * @param {number} seasonNumber - The season number.
124
+ * @returns {Promise<SeasonDetails>} A Promise that resolves with the details of the season.
125
+ */
72
126
  async season(tvId: number, seasonNumber: number): Promise<SeasonDetails> {
73
127
  return await this.api.get<SeasonDetails>(`${BASE_TV}/${tvId}/season/${seasonNumber}`);
74
128
  }
75
129
 
130
+ /**
131
+ * Retrieves episode groups for a specific TV show asynchronously.
132
+ * @param {number} id - The ID of the TV show.
133
+ * @returns {Promise<EpisodeGroups>} A Promise that resolves with the episode groups of the TV show.
134
+ */
76
135
  async episodeGroups(id: number): Promise<EpisodeGroups> {
77
136
  return await this.api.get<EpisodeGroups>(`${BASE_TV}/${id}/episode_groups`);
78
137
  }
79
138
 
139
+ /**
140
+ * Retrieves external IDs for a specific TV show asynchronously.
141
+ * @param {number} id - The ID of the TV show.
142
+ * @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the TV show.
143
+ */
80
144
  async externalIds(id: number): Promise<ExternalIds> {
81
145
  return await this.api.get<ExternalIds>(`${BASE_TV}/${id}/external_ids`);
82
146
  }
83
147
 
148
+ /**
149
+ * Retrieves images for a specific TV show asynchronously.
150
+ * @param {number} id - The ID of the TV show.
151
+ * @param {TvShowImageOptions} [options] - Additional options for the request.
152
+ * @returns {Promise<Images>} A Promise that resolves with the images of the TV show.
153
+ */
84
154
  async images(id: number, options?: TvShowImageOptions): Promise<Images> {
85
155
  const computedOptions = {
86
156
  include_image_language: options?.include_image_language?.join(','),
@@ -89,30 +159,69 @@ export class TvShowsEndpoint extends BaseEndpoint {
89
159
  return await this.api.get<Images>(`${BASE_TV}/${id}/images`, computedOptions);
90
160
  }
91
161
 
162
+ /**
163
+ * Retrieves keywords for a specific TV show asynchronously.
164
+ * @param {number} id - The ID of the TV show.
165
+ * @returns {Promise<Keywords>} A Promise that resolves with the keywords of the TV show.
166
+ */
92
167
  async keywords(id: number): Promise<Keywords> {
93
168
  return await this.api.get<Keywords>(`${BASE_TV}/${id}/keywords`);
94
169
  }
95
170
 
171
+ /**
172
+ * Retrieves recommendations for a specific TV show asynchronously.
173
+ * @param {number} id - The ID of the TV show.
174
+ * @param {LanguageOption & PageOption} [options] - Additional options for the request.
175
+ * @returns {Promise<Recommendations>} A Promise that resolves with the recommendations for the TV show.
176
+ */
96
177
  async recommendations(id: number, options?: LanguageOption & PageOption): Promise<Recommendations> {
97
178
  return await this.api.get<Recommendations>(`${BASE_TV}/${id}/recommendations`, options);
98
179
  }
99
180
 
181
+ /**
182
+ * Retrieves reviews for a specific TV show asynchronously.
183
+ * @param {number} id - The ID of the TV show.
184
+ * @param {LanguageOption & PageOption} [options] - Additional options for the request.
185
+ * @returns {Promise<Reviews>} A Promise that resolves with the reviews of the TV show.
186
+ */
100
187
  async reviews(id: number, options?: LanguageOption & PageOption): Promise<Reviews> {
101
188
  return await this.api.get<Reviews>(`${BASE_TV}/${id}/reviews`, options);
102
189
  }
103
190
 
191
+ /**
192
+ * Retrieves information about whether the TV show was screened theatrically asynchronously.
193
+ * @param {number} id - The ID of the TV show.
194
+ * @returns {Promise<ScreenedTheatrically>} A Promise that resolves with information about theatrical screenings.
195
+ */
104
196
  async screenedTheatrically(id: number): Promise<ScreenedTheatrically> {
105
197
  return await this.api.get<ScreenedTheatrically>(`${BASE_TV}/${id}/screened_theatrically`);
106
198
  }
107
199
 
200
+ /**
201
+ * Retrieves similar TV shows for a specific TV show asynchronously.
202
+ * @param {number} id - The ID of the TV show.
203
+ * @param {LanguageOption & PageOption} [options] - Additional options for the request.
204
+ * @returns {Promise<Similartv>} A Promise that resolves with the similar TV shows.
205
+ */
108
206
  async similar(id: number, options?: LanguageOption & PageOption): Promise<Similartv> {
109
207
  return await this.api.get<Similartv>(`${BASE_TV}/${id}/similar`, options);
110
208
  }
111
209
 
210
+ /**
211
+ * Retrieves translations for a specific TV show asynchronously.
212
+ * @param {number} id - The ID of the TV show.
213
+ * @returns {Promise<Translations>} A Promise that resolves with the translations of the TV show.
214
+ */
112
215
  async translations(id: number): Promise<Translations> {
113
216
  return await this.api.get<Translations>(`${BASE_TV}/${id}/translations`);
114
217
  }
115
218
 
219
+ /**
220
+ * Retrieves videos for a specific TV show asynchronously.
221
+ * @param {number} id - The ID of the TV show.
222
+ * @param {TvShowVideoOptions} [options] - Additional options for the request.
223
+ * @returns {Promise<Videos>} A Promise that resolves with the videos of the TV show.
224
+ */
116
225
  async videos(id: number, options?: TvShowVideoOptions): Promise<Videos> {
117
226
  const computedOptions = {
118
227
  include_video_language: options?.include_video_language?.join(','),
@@ -122,29 +231,55 @@ export class TvShowsEndpoint extends BaseEndpoint {
122
231
  }
123
232
 
124
233
  /**
125
- * Powered by JustWatch
126
- * @param id
234
+ * Retrieves watch providers for a specific TV show asynchronously.
235
+ * Powered by JustWatch.
236
+ * @param {number} id - The ID of the TV show.
237
+ * @returns {Promise<WatchProviders>} A Promise that resolves with the watch providers of the TV show.
127
238
  */
128
239
  async watchProviders(id: number): Promise<WatchProviders> {
129
240
  return await this.api.get<WatchProviders>(`${BASE_TV}/${id}/watch/providers`);
130
241
  }
131
242
 
243
+ /**
244
+ * Retrieves the latest TV show asynchronously.
245
+ * @returns {Promise<Latesttv>} A Promise that resolves with the latest TV show.
246
+ */
132
247
  async latest(): Promise<Latesttv> {
133
248
  return await this.api.get<Latesttv>(`${BASE_TV}/latest`);
134
249
  }
135
250
 
251
+ /**
252
+ * Retrieves TV shows that are currently on the air asynchronously.
253
+ * @param {PageOption & LanguageOption & TimezoneOption} [options] - Additional options for the request.
254
+ * @returns {Promise<OnTheAir>} A Promise that resolves with TV shows currently on the air.
255
+ */
136
256
  async onTheAir(options?: PageOption & LanguageOption & TimezoneOption): Promise<OnTheAir> {
137
257
  return await this.api.get<OnTheAir>(`${BASE_TV}/on_the_air`, options);
138
258
  }
139
259
 
260
+ /**
261
+ * Retrieves TV shows that are airing today asynchronously.
262
+ * @param {PageOption & LanguageOption & TimezoneOption} [options] - Additional options for the request.
263
+ * @returns {Promise<tvAiringToday>} A Promise that resolves with TV shows airing today.
264
+ */
140
265
  async airingToday(options?: PageOption & LanguageOption & TimezoneOption): Promise<tvAiringToday> {
141
266
  return await this.api.get<tvAiringToday>(`${BASE_TV}/airing_today`, options);
142
267
  }
143
268
 
269
+ /**
270
+ * Retrieves popular TV shows asynchronously.
271
+ * @param {PageOption & LanguageOption} [options] - Additional options for the request.
272
+ * @returns {Promise<Populartv>} A Promise that resolves with popular TV shows.
273
+ */
144
274
  async popular(options?: PageOption & LanguageOption): Promise<Populartv> {
145
275
  return await this.api.get<Populartv>(`${BASE_TV}/popular`, options);
146
276
  }
147
277
 
278
+ /**
279
+ * Retrieves top-rated TV shows asynchronously.
280
+ * @param {PageOption & LanguageOption} [options] - Additional options for the request.
281
+ * @returns {Promise<TopRatedtv>} A Promise that resolves with top-rated TV shows.
282
+ */
148
283
  async topRated(options?: PageOption & LanguageOption): Promise<TopRatedtv> {
149
284
  return await this.api.get<TopRatedtv>(`${BASE_TV}/top_rated`, options);
150
285
  }