@tdanks2000/tmdb-wrapper 1.1.2 → 1.2.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.
- package/dist/@types/endpoints/account.d.ts +16 -0
- package/dist/@types/endpoints/account.d.ts.map +1 -0
- package/dist/@types/endpoints/certification.d.ts +19 -0
- package/dist/@types/endpoints/certification.d.ts.map +1 -0
- package/dist/@types/endpoints/changes.d.ts +26 -0
- package/dist/@types/endpoints/changes.d.ts.map +1 -0
- package/dist/@types/endpoints/collection.d.ts +21 -0
- package/dist/@types/endpoints/collection.d.ts.map +1 -0
- package/dist/@types/endpoints/companies.d.ts +29 -0
- package/dist/@types/endpoints/companies.d.ts.map +1 -0
- package/dist/@types/endpoints/configuration.d.ts +106 -0
- package/dist/@types/endpoints/configuration.d.ts.map +1 -0
- package/dist/@types/endpoints/credits.d.ts +135 -0
- package/dist/@types/endpoints/credits.d.ts.map +1 -0
- package/dist/@types/endpoints/discover.d.ts +68 -0
- package/dist/@types/endpoints/discover.d.ts.map +1 -0
- package/dist/@types/endpoints/find.d.ts +20 -0
- package/dist/@types/endpoints/find.d.ts.map +1 -0
- package/dist/@types/endpoints/genre.d.ts +7 -0
- package/dist/@types/endpoints/genre.d.ts.map +1 -0
- package/dist/@types/endpoints/index.d.ts +23 -0
- package/dist/@types/endpoints/index.d.ts.map +1 -0
- package/dist/@types/endpoints/keywords.d.ts +21 -0
- package/dist/@types/endpoints/keywords.d.ts.map +1 -0
- package/dist/@types/endpoints/movies.d.ts +150 -0
- package/dist/@types/endpoints/movies.d.ts.map +1 -0
- package/dist/@types/endpoints/networks.d.ts +14 -0
- package/dist/@types/endpoints/networks.d.ts.map +1 -0
- package/dist/@types/endpoints/options.d.ts +71 -0
- package/dist/@types/endpoints/options.d.ts.map +1 -0
- package/dist/@types/endpoints/people.d.ts +135 -0
- package/dist/@types/endpoints/people.d.ts.map +1 -0
- package/dist/@types/endpoints/review.d.ts +8 -0
- package/dist/@types/endpoints/review.d.ts.map +1 -0
- package/dist/@types/endpoints/search.d.ts +32 -0
- package/dist/@types/endpoints/search.d.ts.map +1 -0
- package/dist/@types/endpoints/trending.d.ts +12 -0
- package/dist/@types/endpoints/trending.d.ts.map +1 -0
- package/dist/@types/endpoints/tvEpisode.d.ts +65 -0
- package/dist/@types/endpoints/tvEpisode.d.ts.map +1 -0
- package/dist/@types/endpoints/tvSeasons.d.ts +31 -0
- package/dist/@types/endpoints/tvSeasons.d.ts.map +1 -0
- package/dist/@types/endpoints/tvShows.d.ts +260 -0
- package/dist/@types/endpoints/tvShows.d.ts.map +1 -0
- package/dist/@types/endpoints/watchProviders.d.ts +303 -0
- package/dist/@types/endpoints/watchProviders.d.ts.map +1 -0
- package/dist/@types/index.d.ts +4 -0
- package/dist/@types/index.d.ts.map +1 -0
- package/dist/@types/models/baseEndpoint.d.ts +8 -0
- package/dist/@types/models/baseEndpoint.d.ts.map +1 -0
- package/dist/@types/models/index.d.ts +2 -0
- package/dist/@types/models/index.d.ts.map +1 -0
- package/dist/@types/types.d.ts +179 -0
- package/dist/@types/types.d.ts.map +1 -0
- package/dist/endpoints/account.d.ts +18 -0
- package/dist/endpoints/account.d.ts.map +1 -0
- package/dist/endpoints/certification.d.ts +23 -0
- package/dist/endpoints/certification.d.ts.map +1 -0
- package/dist/endpoints/changes.d.ts +31 -0
- package/dist/endpoints/changes.d.ts.map +1 -0
- package/dist/endpoints/collections.d.ts +34 -0
- package/dist/endpoints/collections.d.ts.map +1 -0
- package/dist/endpoints/companies.d.ts +31 -0
- package/dist/endpoints/companies.d.ts.map +1 -0
- package/dist/endpoints/configuration.d.ts +18 -0
- package/dist/endpoints/configuration.d.ts.map +1 -0
- package/dist/endpoints/credits.d.ts +19 -0
- package/dist/endpoints/credits.d.ts.map +1 -0
- package/dist/endpoints/discover.d.ts +25 -0
- package/dist/endpoints/discover.d.ts.map +1 -0
- package/dist/endpoints/find.d.ts +20 -0
- package/dist/endpoints/find.d.ts.map +1 -0
- package/dist/endpoints/genre.d.ts +25 -0
- package/dist/endpoints/genre.d.ts.map +1 -0
- package/dist/endpoints/index.d.ts +22 -0
- package/dist/endpoints/index.d.ts.map +1 -0
- package/dist/endpoints/keywords.d.ts +26 -0
- package/dist/endpoints/keywords.d.ts.map +1 -0
- package/dist/endpoints/movies.d.ts +142 -0
- package/dist/endpoints/movies.d.ts.map +1 -0
- package/dist/endpoints/networks.d.ts +31 -0
- package/dist/endpoints/networks.d.ts.map +1 -0
- package/dist/endpoints/people.d.ts +85 -0
- package/dist/endpoints/people.d.ts.map +1 -0
- package/dist/endpoints/review.d.ts +19 -0
- package/dist/endpoints/review.d.ts.map +1 -0
- package/dist/endpoints/search.d.ts +58 -0
- package/dist/endpoints/search.d.ts.map +1 -0
- package/dist/endpoints/trending.d.ts +22 -0
- package/dist/endpoints/trending.d.ts.map +1 -0
- package/dist/endpoints/tvEpisodes.d.ts +62 -0
- package/dist/endpoints/tvEpisodes.d.ts.map +1 -0
- package/dist/endpoints/tvSeasons.d.ts +71 -0
- package/dist/endpoints/tvSeasons.d.ts.map +1 -0
- package/dist/endpoints/tvShows.d.ts +164 -0
- package/dist/endpoints/tvShows.d.ts.map +1 -0
- package/dist/endpoints/watchProviders.d.ts +33 -0
- package/dist/endpoints/watchProviders.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/api.d.ts +14 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/getimagePath.d.ts +32 -0
- package/dist/utils/getimagePath.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { AggregateCredits, AlternativeTitles, AppendToResponse, AppendToResponseTvKey, BaseEndpoint, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, Latesttv, OnTheAir, PageOption, Populartv, Recommendations, Reviews, ScreenedTheatrically, SeasonDetails, Similartv, TimezoneOption, TokenType, TopRatedtv, Translations, TvShowChangeValue, TvShowDetails, TvShowImageOptions, TvShowVideoOptions, tvAiringToday, Videos, WatchProviders } from "../@types";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing TV show-related information.
|
|
4
|
+
*/
|
|
5
|
+
export declare class TvShowsEndpoint extends BaseEndpoint {
|
|
6
|
+
protected readonly access_token: TokenType;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new TvShowsEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
11
|
+
constructor(access_token: TokenType);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves details of a specific TV show asynchronously.
|
|
14
|
+
* @param {number} id - The ID of the TV show.
|
|
15
|
+
* @param {AppendToResponseTvKey[]} [appendToResponse] - Additional data to append to the response.
|
|
16
|
+
* @param {string} [language] - The language for the response.
|
|
17
|
+
* @returns {Promise<AppendToResponse<TvShowDetails, AppendToResponseTvKey[], 'tvShow'>>}
|
|
18
|
+
* A Promise that resolves with the details of the TV show.
|
|
19
|
+
*/
|
|
20
|
+
details<T extends AppendToResponseTvKey[] | undefined>(id: number, appendToResponse?: T, language?: string): Promise<AppendToResponse<TvShowDetails, T, "tvShow">>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves alternative titles of a specific TV show asynchronously.
|
|
23
|
+
* @param {number} id - The ID of the TV show.
|
|
24
|
+
* @returns {Promise<AlternativeTitles>} A Promise that resolves with the alternative titles of the TV show.
|
|
25
|
+
*/
|
|
26
|
+
alternativeTitles(id: number): Promise<AlternativeTitles>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves changes for a specific TV show asynchronously.
|
|
29
|
+
* @param {number} id - The ID of the TV show.
|
|
30
|
+
* @param {ChangeOption} [options] - Additional options for the request.
|
|
31
|
+
* @returns {Promise<Changes<TvShowChangeValue>>}
|
|
32
|
+
* A Promise that resolves with the changes for the TV show.
|
|
33
|
+
*/
|
|
34
|
+
changes(id: number, options?: ChangeOption): Promise<Changes<TvShowChangeValue>>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves content ratings for a specific TV show asynchronously.
|
|
37
|
+
* @param {number} id - The ID of the TV show.
|
|
38
|
+
* @returns {Promise<ContentRatings>} A Promise that resolves with the content ratings of the TV show.
|
|
39
|
+
*/
|
|
40
|
+
contentRatings(id: number): Promise<ContentRatings>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves aggregate credits for a specific TV show asynchronously.
|
|
43
|
+
* @param {number} id - The ID of the TV show.
|
|
44
|
+
* @param {LanguageOption} [options] - Additional options for the request.
|
|
45
|
+
* @returns {Promise<AggregateCredits>} A Promise that resolves with the aggregate credits of the TV show.
|
|
46
|
+
*/
|
|
47
|
+
aggregateCredits(id: number, options?: LanguageOption): Promise<AggregateCredits>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves credits for a specific TV show asynchronously.
|
|
50
|
+
* @param {number} id - The ID of the TV show.
|
|
51
|
+
* @param {LanguageOption} [options] - Additional options for the request.
|
|
52
|
+
* @returns {Promise<Credits>} A Promise that resolves with the credits of the TV show.
|
|
53
|
+
*/
|
|
54
|
+
credits(id: number, options?: LanguageOption): Promise<Credits>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves details of a specific season of a TV show asynchronously.
|
|
57
|
+
* @param {number} tvId - The ID of the TV show.
|
|
58
|
+
* @param {number} seasonNumber - The season number.
|
|
59
|
+
* @returns {Promise<SeasonDetails>} A Promise that resolves with the details of the season.
|
|
60
|
+
*/
|
|
61
|
+
season(tvId: number, seasonNumber: number): Promise<SeasonDetails>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves episode groups for a specific TV show asynchronously.
|
|
64
|
+
* @param {number} id - The ID of the TV show.
|
|
65
|
+
* @returns {Promise<EpisodeGroups>} A Promise that resolves with the episode groups of the TV show.
|
|
66
|
+
*/
|
|
67
|
+
episodeGroups(id: number): Promise<EpisodeGroups>;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves external IDs for a specific TV show asynchronously.
|
|
70
|
+
* @param {number} id - The ID of the TV show.
|
|
71
|
+
* @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the TV show.
|
|
72
|
+
*/
|
|
73
|
+
externalIds(id: number): Promise<ExternalIds>;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves images for a specific TV show asynchronously.
|
|
76
|
+
* @param {number} id - The ID of the TV show.
|
|
77
|
+
* @param {TvShowImageOptions} [options] - Additional options for the request.
|
|
78
|
+
* @returns {Promise<Images>} A Promise that resolves with the images of the TV show.
|
|
79
|
+
*/
|
|
80
|
+
images(id: number, options?: TvShowImageOptions): Promise<Images>;
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves keywords for a specific TV show asynchronously.
|
|
83
|
+
* @param {number} id - The ID of the TV show.
|
|
84
|
+
* @returns {Promise<Keywords>} A Promise that resolves with the keywords of the TV show.
|
|
85
|
+
*/
|
|
86
|
+
keywords(id: number): Promise<Keywords>;
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves recommendations for a specific TV show asynchronously.
|
|
89
|
+
* @param {number} id - The ID of the TV show.
|
|
90
|
+
* @param {LanguageOption & PageOption} [options] - Additional options for the request.
|
|
91
|
+
* @returns {Promise<Recommendations>} A Promise that resolves with the recommendations for the TV show.
|
|
92
|
+
*/
|
|
93
|
+
recommendations(id: number, options?: LanguageOption & PageOption): Promise<Recommendations>;
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves reviews for a specific TV show asynchronously.
|
|
96
|
+
* @param {number} id - The ID of the TV show.
|
|
97
|
+
* @param {LanguageOption & PageOption} [options] - Additional options for the request.
|
|
98
|
+
* @returns {Promise<Reviews>} A Promise that resolves with the reviews of the TV show.
|
|
99
|
+
*/
|
|
100
|
+
reviews(id: number, options?: LanguageOption & PageOption): Promise<Reviews>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves information about whether the TV show was screened theatrically asynchronously.
|
|
103
|
+
* @param {number} id - The ID of the TV show.
|
|
104
|
+
* @returns {Promise<ScreenedTheatrically>} A Promise that resolves with information about theatrical screenings.
|
|
105
|
+
*/
|
|
106
|
+
screenedTheatrically(id: number): Promise<ScreenedTheatrically>;
|
|
107
|
+
/**
|
|
108
|
+
* Retrieves similar TV shows for a specific TV show asynchronously.
|
|
109
|
+
* @param {number} id - The ID of the TV show.
|
|
110
|
+
* @param {LanguageOption & PageOption} [options] - Additional options for the request.
|
|
111
|
+
* @returns {Promise<Similartv>} A Promise that resolves with the similar TV shows.
|
|
112
|
+
*/
|
|
113
|
+
similar(id: number, options?: LanguageOption & PageOption): Promise<Similartv>;
|
|
114
|
+
/**
|
|
115
|
+
* Retrieves translations for a specific TV show asynchronously.
|
|
116
|
+
* @param {number} id - The ID of the TV show.
|
|
117
|
+
* @returns {Promise<Translations>} A Promise that resolves with the translations of the TV show.
|
|
118
|
+
*/
|
|
119
|
+
translations(id: number): Promise<Translations>;
|
|
120
|
+
/**
|
|
121
|
+
* Retrieves videos for a specific TV show asynchronously.
|
|
122
|
+
* @param {number} id - The ID of the TV show.
|
|
123
|
+
* @param {TvShowVideoOptions} [options] - Additional options for the request.
|
|
124
|
+
* @returns {Promise<Videos>} A Promise that resolves with the videos of the TV show.
|
|
125
|
+
*/
|
|
126
|
+
videos(id: number, options?: TvShowVideoOptions): Promise<Videos>;
|
|
127
|
+
/**
|
|
128
|
+
* Retrieves watch providers for a specific TV show asynchronously.
|
|
129
|
+
* Powered by JustWatch.
|
|
130
|
+
* @param {number} id - The ID of the TV show.
|
|
131
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the watch providers of the TV show.
|
|
132
|
+
*/
|
|
133
|
+
watchProviders(id: number): Promise<WatchProviders>;
|
|
134
|
+
/**
|
|
135
|
+
* Retrieves the latest TV show asynchronously.
|
|
136
|
+
* @returns {Promise<Latesttv>} A Promise that resolves with the latest TV show.
|
|
137
|
+
*/
|
|
138
|
+
latest(): Promise<Latesttv>;
|
|
139
|
+
/**
|
|
140
|
+
* Retrieves TV shows that are currently on the air asynchronously.
|
|
141
|
+
* @param {PageOption & LanguageOption & TimezoneOption} [options] - Additional options for the request.
|
|
142
|
+
* @returns {Promise<OnTheAir>} A Promise that resolves with TV shows currently on the air.
|
|
143
|
+
*/
|
|
144
|
+
onTheAir(options?: PageOption & LanguageOption & TimezoneOption): Promise<OnTheAir>;
|
|
145
|
+
/**
|
|
146
|
+
* Retrieves TV shows that are airing today asynchronously.
|
|
147
|
+
* @param {PageOption & LanguageOption & TimezoneOption} [options] - Additional options for the request.
|
|
148
|
+
* @returns {Promise<tvAiringToday>} A Promise that resolves with TV shows airing today.
|
|
149
|
+
*/
|
|
150
|
+
airingToday(options?: PageOption & LanguageOption & TimezoneOption): Promise<tvAiringToday>;
|
|
151
|
+
/**
|
|
152
|
+
* Retrieves popular TV shows asynchronously.
|
|
153
|
+
* @param {PageOption & LanguageOption} [options] - Additional options for the request.
|
|
154
|
+
* @returns {Promise<Populartv>} A Promise that resolves with popular TV shows.
|
|
155
|
+
*/
|
|
156
|
+
popular(options?: PageOption & LanguageOption): Promise<Populartv>;
|
|
157
|
+
/**
|
|
158
|
+
* Retrieves top-rated TV shows asynchronously.
|
|
159
|
+
* @param {PageOption & LanguageOption} [options] - Additional options for the request.
|
|
160
|
+
* @returns {Promise<TopRatedtv>} A Promise that resolves with top-rated TV shows.
|
|
161
|
+
*/
|
|
162
|
+
topRated(options?: PageOption & LanguageOption): Promise<TopRatedtv>;
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=tvShows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tvShows.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvShows.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,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QAAQ,CAAC;IAIjC;;;;OAIG;IACG,QAAQ,CACb,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,cAAc,GACpD,OAAO,CAAC,QAAQ,CAAC;IAOpB;;;;OAIG;IACG,WAAW,CAChB,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,cAAc,GACpD,OAAO,CAAC,aAAa,CAAC;IAQzB;;;;OAIG;IACG,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;IAOxE;;;;OAIG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;CAM1E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseEndpoint, TokenType, WatchProviders, WatchRegionsResponse } 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: TokenType;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new WatchProvidersEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
11
|
+
constructor(access_token: TokenType);
|
|
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<WatchRegionsResponse>} A Promise that resolves with the list of available regions.
|
|
20
|
+
*/
|
|
21
|
+
regions(): Promise<WatchRegionsResponse>;
|
|
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,EACN,YAAY,EACZ,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,YAAY;IAK3C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS;IAJtD;;;OAGG;gBAC4B,YAAY,EAAE,SAAS;IAItD;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC;IAI1C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI9C;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,cAAc,CAAC;IAItC;;;OAGG;IACG,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC;CAGnC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TokenType } from "./@types";
|
|
2
|
+
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CollectionsEndpoint, CompaniesEndpoint, ConfigurationEndpoint, CreditsEndpoint, DiscoverEndpoint, FindEndpoint, GenreEndpoint, KeywordsEndpoint, MoviesEndpoint, NetworksEndpoint, PeopleEndpoint, ReviewEndpoint, SearchEndpoint, TrendingEndpoint, TvEpisodesEndpoint, TvSeasonsEndpoint, TvShowsEndpoint, WatchProvidersEndpoint } from "./endpoints";
|
|
3
|
+
declare class TMDB {
|
|
4
|
+
constructor(auth: TokenType);
|
|
5
|
+
account: AccountEndpoint;
|
|
6
|
+
certification: CertificationEndpoint;
|
|
7
|
+
changes: ChangeEndpoint;
|
|
8
|
+
collections: CollectionsEndpoint;
|
|
9
|
+
companies: CompaniesEndpoint;
|
|
10
|
+
configuration: ConfigurationEndpoint;
|
|
11
|
+
credits: CreditsEndpoint;
|
|
12
|
+
discover: DiscoverEndpoint;
|
|
13
|
+
find: FindEndpoint;
|
|
14
|
+
genre: GenreEndpoint;
|
|
15
|
+
keywords: KeywordsEndpoint;
|
|
16
|
+
movies: MoviesEndpoint;
|
|
17
|
+
networks: NetworksEndpoint;
|
|
18
|
+
people: PeopleEndpoint;
|
|
19
|
+
review: ReviewEndpoint;
|
|
20
|
+
search: SearchEndpoint;
|
|
21
|
+
trending: TrendingEndpoint;
|
|
22
|
+
tvEpisodes: TvEpisodesEndpoint;
|
|
23
|
+
tvSeasons: TvSeasonsEndpoint;
|
|
24
|
+
tvShows: TvShowsEndpoint;
|
|
25
|
+
watchProviders: WatchProvidersEndpoint;
|
|
26
|
+
}
|
|
27
|
+
export * from "./@types";
|
|
28
|
+
export * from "./utils";
|
|
29
|
+
export { TMDB };
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EACN,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,MAAM,aAAa,CAAC;AAErB,cAAM,IAAI;gBACG,IAAI,EAAE,SAAS;IAwB3B,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE,qBAAqB,CAAC;IACrC,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,aAAa,EAAE,qBAAqB,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,eAAe,CAAC;IACzB,cAAc,EAAE,sBAAsB,CAAC;CACvC;AAED,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenType } from "../@types";
|
|
2
|
+
export declare class API {
|
|
3
|
+
private apiKey?;
|
|
4
|
+
private accessToken?;
|
|
5
|
+
constructor(auth: TokenType);
|
|
6
|
+
/**
|
|
7
|
+
* Generic GET:
|
|
8
|
+
* @template T — response type
|
|
9
|
+
* @template O — options (query params) type
|
|
10
|
+
*/
|
|
11
|
+
get<T, O extends Record<string, unknown> = Record<string, unknown>>(path: string, options?: O): Promise<T>;
|
|
12
|
+
}
|
|
13
|
+
export declare const parseOptions: (options?: Record<string, unknown>) => string;
|
|
14
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,WAAW,CAAC;AAIrD,qBAAa,GAAG;IACf,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,WAAW,CAAC,CAAS;gBAEjB,IAAI,EAAE,SAAS;IAS3B;;;;OAIG;IACG,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,GACT,OAAO,CAAC,CAAC,CAAC;CAyBb;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAkBhE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility method to construct full url for image
|
|
3
|
+
* based on configuration
|
|
4
|
+
*
|
|
5
|
+
* https://developers.themoviedb.org/3/getting-started/images
|
|
6
|
+
* @param {string} baseUrl base image url (e.g., 'https://image.tmdb.org/t/p/')
|
|
7
|
+
* @param {string} fileSize file size (e.g., 'original', 'w500')
|
|
8
|
+
* @param {string} imagePath raw image path
|
|
9
|
+
* @param {string} format override image format (e.g., 'svg', 'png', 'jpg')
|
|
10
|
+
* @returns {string} The complete image URL
|
|
11
|
+
*/
|
|
12
|
+
export declare const getFullImagePath: (baseUrl: string, fileSize: string, imagePath: string, format?: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Common image sizes available in TMDB
|
|
15
|
+
*/
|
|
16
|
+
export declare const ImageSizes: {
|
|
17
|
+
ORIGINAL: string;
|
|
18
|
+
W500: string;
|
|
19
|
+
W300: string;
|
|
20
|
+
W185: string;
|
|
21
|
+
W92: string;
|
|
22
|
+
H632: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Image formats supported by TMDB
|
|
26
|
+
*/
|
|
27
|
+
export declare const ImageFormats: {
|
|
28
|
+
JPG: string;
|
|
29
|
+
PNG: string;
|
|
30
|
+
SVG: string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=getimagePath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getimagePath.d.ts","sourceRoot":"","sources":["../../src/utils/getimagePath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAC5B,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,SAAS,MAAM,KACb,MAeF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;CAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;;CAIxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdanks2000/tmdb-wrapper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A powerful and easy-to-use TypeScript wrapper for The Movie Database (TMDb) API",
|
|
5
5
|
"module": "./src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"check:write": "biome check --write ."
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "^2.0.0-beta.
|
|
58
|
-
"@types/node": "^22.15.
|
|
57
|
+
"@biomejs/biome": "^2.0.0-beta.5",
|
|
58
|
+
"@types/node": "^22.15.27",
|
|
59
59
|
"ts-node": "^10.9.2",
|
|
60
|
-
"tsc-alias": "^1.8.
|
|
60
|
+
"tsc-alias": "^1.8.16",
|
|
61
61
|
"typescript": "^5.8.3"
|
|
62
62
|
}
|
|
63
63
|
}
|