@justwicked/tmdb-client 1.0.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/README.md +40 -0
- package/dist/client/__generated__/api/tmdbApi.d.ts +9117 -0
- package/dist/client/__generated__/api/tmdbApi.js +3248 -0
- package/dist/client/services/account/account-service.d.ts +17 -0
- package/dist/client/services/account/account-service.js +40 -0
- package/dist/client/services/authentication/authentication-service.d.ts +13 -0
- package/dist/client/services/authentication/authentication-service.js +28 -0
- package/dist/client/services/certification/certification-service.d.ts +7 -0
- package/dist/client/services/certification/certification-service.js +13 -0
- package/dist/client/services/collection/collection-service.d.ts +9 -0
- package/dist/client/services/collection/collection-service.js +16 -0
- package/dist/client/services/company/company-service.d.ts +8 -0
- package/dist/client/services/company/company-service.js +16 -0
- package/dist/client/services/configuration/configuration-service.d.ts +12 -0
- package/dist/client/services/configuration/configuration-service.js +25 -0
- package/dist/client/services/credit/credit-service.d.ts +6 -0
- package/dist/client/services/credit/credit-service.js +10 -0
- package/dist/client/services/dicover/discover-service.d.ts +8 -0
- package/dist/client/services/dicover/discover-service.js +13 -0
- package/dist/client/services/find/find-service.d.ts +7 -0
- package/dist/client/services/find/find-service.js +10 -0
- package/dist/client/services/genre/genre-service.d.ts +8 -0
- package/dist/client/services/genre/genre-service.js +13 -0
- package/dist/client/services/guest-session/guest-session-service.d.ts +9 -0
- package/dist/client/services/guest-session/guest-session-service.js +16 -0
- package/dist/client/services/keyword/keyword-service.d.ts +8 -0
- package/dist/client/services/keyword/keyword-service.js +13 -0
- package/dist/client/services/list/list-service.d.ts +13 -0
- package/dist/client/services/list/list-service.js +28 -0
- package/dist/client/services/movie/movie-service.d.ts +30 -0
- package/dist/client/services/movie/movie-service.js +79 -0
- package/dist/client/services/network/network-service.d.ts +8 -0
- package/dist/client/services/network/network-service.js +16 -0
- package/dist/client/services/person/person-service.d.ts +18 -0
- package/dist/client/services/person/person-service.js +43 -0
- package/dist/client/services/review/review-service.d.ts +6 -0
- package/dist/client/services/review/review-service.js +10 -0
- package/dist/client/services/search/search-service.d.ts +13 -0
- package/dist/client/services/search/search-service.js +28 -0
- package/dist/client/services/trending/trending-service.d.ts +10 -0
- package/dist/client/services/trending/trending-service.js +19 -0
- package/dist/client/services/tv/episode-service.d.ts +18 -0
- package/dist/client/services/tv/episode-service.js +43 -0
- package/dist/client/services/tv/season-service.d.ts +16 -0
- package/dist/client/services/tv/season-service.js +37 -0
- package/dist/client/services/tv/tv-service.d.ts +36 -0
- package/dist/client/services/tv/tv-service.js +91 -0
- package/dist/client/services/watch/watch-service.d.ts +9 -0
- package/dist/client/services/watch/watch-service.js +16 -0
- package/dist/client/tmdb-client.d.ts +47 -0
- package/dist/client/tmdb-client.js +69 -0
- package/dist/client/types.d.ts +16 -0
- package/dist/client/types.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { reviewDetails } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class ReviewService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(reviewId) {
|
|
8
|
+
return await reviewDetails(reviewId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SearchCollectionParams, SearchCompanyParams, SearchKeywordParams, SearchMovieParams, SearchMultiParams, SearchPersonParams, SearchTvParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class SearchService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getCollection(params: SearchCollectionParams): Promise<import("../../types").SearchCollection200>;
|
|
7
|
+
getCompany(params: SearchCompanyParams): Promise<import("../../types").SearchCompany200>;
|
|
8
|
+
getKeyword(params: SearchKeywordParams): Promise<import("../../types").SearchKeyword200>;
|
|
9
|
+
getMovie(params: SearchMovieParams): Promise<import("../../types").SearchMovie200>;
|
|
10
|
+
getMulti(params: SearchMultiParams): Promise<import("../../types").SearchMulti200>;
|
|
11
|
+
getPerson(params: SearchPersonParams): Promise<import("../../types").SearchPerson200>;
|
|
12
|
+
getTv(params: SearchTvParams): Promise<import("../../types").SearchTv200>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { searchCollection, searchCompany, searchKeyword, searchMovie, searchMulti, searchPerson, searchTv } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class SearchService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getCollection(params) {
|
|
8
|
+
return await searchCollection(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getCompany(params) {
|
|
11
|
+
return await searchCompany(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getKeyword(params) {
|
|
14
|
+
return await searchKeyword(params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getMovie(params) {
|
|
17
|
+
return await searchMovie(params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getMulti(params) {
|
|
20
|
+
return await searchMulti(params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getPerson(params) {
|
|
23
|
+
return await searchPerson(params, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getTv(params) {
|
|
26
|
+
return await searchTv(params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TrendingAllParams, TrendingMoviesParams, TrendingPeopleParams, TrendingTvParams } from '../../__generated__/api/tmdbApi';
|
|
2
|
+
import { CustomRequestInit } from '../../types';
|
|
3
|
+
export default class TrendingService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getAll(params?: TrendingAllParams, timeWindow?: 'day' | 'week'): Promise<import("../../types").TrendingAll200>;
|
|
7
|
+
getMovies(params?: TrendingMoviesParams, timeWindow?: 'day' | 'week'): Promise<import("../../types").TrendingMovies200>;
|
|
8
|
+
getPeople(params?: TrendingPeopleParams, timeWindow?: 'day' | 'week'): Promise<import("../../types").TrendingPeople200>;
|
|
9
|
+
getTv(params?: TrendingTvParams, timeWindow?: 'day' | 'week'): Promise<import("../../types").TrendingTv200>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { trendingAll, trendingMovies, trendingPeople, trendingTv } from '../../__generated__/api/tmdbApi';
|
|
2
|
+
export default class TrendingService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getAll(params, timeWindow = 'day') {
|
|
8
|
+
return await trendingAll(params, timeWindow, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getMovies(params, timeWindow = 'day') {
|
|
11
|
+
return await trendingMovies(params, timeWindow, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getPeople(params, timeWindow = 'day') {
|
|
14
|
+
return await trendingPeople(params, timeWindow, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getTv(params, timeWindow = 'day') {
|
|
17
|
+
return await trendingTv(params, timeWindow, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TvEpisodeDetailsParams, TvEpisodeAccountStatesParams, TvEpisodeCreditsParams, TvEpisodeImagesParams, TvEpisodeVideosParams, TvEpisodeAddRatingBody, TvEpisodeAddRatingParams, TvEpisodeDeleteRatingParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class EpisodeService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getGroups(seriesId: number): Promise<import("../../types").TvSeriesEpisodeGroups200>;
|
|
7
|
+
getDetails(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeDetailsParams): Promise<import("../../types").TvEpisodeDetails200>;
|
|
8
|
+
getAccountStates(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeAccountStatesParams): Promise<import("../../types").TvEpisodeAccountStates200>;
|
|
9
|
+
getChangesById(episodeId: number): Promise<import("../../types").TvEpisodeChangesById200>;
|
|
10
|
+
getCredits(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeCreditsParams): Promise<import("../../types").TvEpisodeCredits200>;
|
|
11
|
+
getExternalIds(seriesId: number, seasonNumber: number, episodeNumber: string): Promise<import("../../types").TvEpisodeExternalIds200>;
|
|
12
|
+
getImages(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeImagesParams): Promise<import("../../types").TvEpisodeImages200>;
|
|
13
|
+
getTranslations(seriesId: number, seasonNumber: number, episodeNumber: number): Promise<import("../../types").TvEpisodeTranslations200>;
|
|
14
|
+
getVideos(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeVideosParams): Promise<import("../../types").TvEpisodeVideos200>;
|
|
15
|
+
addRating(seriesId: number, seasonNumber: number, episodeNumber: number, tvEpisodeAddRatingBody: TvEpisodeAddRatingBody, params?: TvEpisodeAddRatingParams): Promise<import("../../types").TvEpisodeAddRating200>;
|
|
16
|
+
deleteRating(seriesId: number, seasonNumber: number, episodeNumber: number, params?: TvEpisodeDeleteRatingParams): Promise<import("../../types").TvEpisodeDeleteRating200>;
|
|
17
|
+
getGroupDetails(tvEpisodeGroupId: string): Promise<import("../../types").TvEpisodeGroupDetails200>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { tvSeriesEpisodeGroups, tvEpisodeDetails, tvEpisodeAccountStates, tvEpisodeChangesById, tvEpisodeCredits, tvEpisodeExternalIds, tvEpisodeImages, tvEpisodeTranslations, tvEpisodeVideos, tvEpisodeAddRating, tvEpisodeDeleteRating, tvEpisodeGroupDetails } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class EpisodeService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getGroups(seriesId) {
|
|
8
|
+
return await tvSeriesEpisodeGroups(seriesId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getDetails(seriesId, seasonNumber, episodeNumber, params) {
|
|
11
|
+
return await tvEpisodeDetails(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getAccountStates(seriesId, seasonNumber, episodeNumber, params) {
|
|
14
|
+
return await tvEpisodeAccountStates(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getChangesById(episodeId) {
|
|
17
|
+
return await tvEpisodeChangesById(episodeId, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getCredits(seriesId, seasonNumber, episodeNumber, params) {
|
|
20
|
+
return await tvEpisodeCredits(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getExternalIds(seriesId, seasonNumber, episodeNumber) {
|
|
23
|
+
return await tvEpisodeExternalIds(seriesId, seasonNumber, episodeNumber, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getImages(seriesId, seasonNumber, episodeNumber, params) {
|
|
26
|
+
return await tvEpisodeImages(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getTranslations(seriesId, seasonNumber, episodeNumber) {
|
|
29
|
+
return await tvEpisodeTranslations(seriesId, seasonNumber, episodeNumber, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getVideos(seriesId, seasonNumber, episodeNumber, params) {
|
|
32
|
+
return await tvEpisodeVideos(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async addRating(seriesId, seasonNumber, episodeNumber, tvEpisodeAddRatingBody, params) {
|
|
35
|
+
return await tvEpisodeAddRating(seriesId, seasonNumber, episodeNumber, tvEpisodeAddRatingBody, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
async deleteRating(seriesId, seasonNumber, episodeNumber, params) {
|
|
38
|
+
return await tvEpisodeDeleteRating(seriesId, seasonNumber, episodeNumber, params, this.defaultOptions);
|
|
39
|
+
}
|
|
40
|
+
async getGroupDetails(tvEpisodeGroupId) {
|
|
41
|
+
return await tvEpisodeGroupDetails(tvEpisodeGroupId, this.defaultOptions);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TvSeasonDetailsParams, TvSeasonAccountStatesParams, TvSeasonAggregateCreditsParams, TvSeasonChangesByIdParams, TvSeasonCreditsParams, TvSeasonImagesParams, TvSeasonVideosParams, TvSeasonWatchProvidersParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class SeasonService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getDetails(seriesId: number, seasonNumber: number, params?: TvSeasonDetailsParams): Promise<import("../../types").TvSeasonDetails200>;
|
|
7
|
+
getAccountStates(seriesId: number, seasonNumber: number, params?: TvSeasonAccountStatesParams): Promise<import("../../types").TvSeasonAccountStates200>;
|
|
8
|
+
getAggregateCredits(seriesId: number, seasonNumber: number, params?: TvSeasonAggregateCreditsParams): Promise<import("../../types").TvSeasonAggregateCredits200>;
|
|
9
|
+
getChangesById(seriesId: number, params?: TvSeasonChangesByIdParams): Promise<import("../../types").TvSeasonChangesById200>;
|
|
10
|
+
getCredits(seriesId: number, seasonNumber: number, params?: TvSeasonCreditsParams): Promise<import("../../types").TvSeasonCredits200>;
|
|
11
|
+
getExternalIds(seriesId: number, seasonNumber: number): Promise<import("../../types").TvSeasonExternalIds200>;
|
|
12
|
+
getImages(seriesId: number, seasonNumber: number, params?: TvSeasonImagesParams): Promise<import("../../types").TvSeasonImages200>;
|
|
13
|
+
getTranslations(seriesId: number, seasonNumber: number): Promise<import("../../types").TvSeasonTranslations200>;
|
|
14
|
+
getVideos(seriesId: number, seasonNumber: number, params?: TvSeasonVideosParams): Promise<import("../../types").TvSeasonVideos200>;
|
|
15
|
+
getWatchProviders(seriesId: number, seasonNumber: number, params?: TvSeasonWatchProvidersParams): Promise<import("../../types").TvSeasonWatchProviders200>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { tvSeasonAccountStates, tvSeasonAggregateCredits, tvSeasonChangesById, tvSeasonCredits, tvSeasonDetails, tvSeasonExternalIds, tvSeasonImages, tvSeasonTranslations, tvSeasonVideos, tvSeasonWatchProviders } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class SeasonService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(seriesId, seasonNumber, params) {
|
|
8
|
+
return await tvSeasonDetails(seriesId, seasonNumber, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getAccountStates(seriesId, seasonNumber, params) {
|
|
11
|
+
return await tvSeasonAccountStates(seriesId, seasonNumber, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getAggregateCredits(seriesId, seasonNumber, params) {
|
|
14
|
+
return await tvSeasonAggregateCredits(seriesId, seasonNumber, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getChangesById(seriesId, params) {
|
|
17
|
+
return await tvSeasonChangesById(seriesId, params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getCredits(seriesId, seasonNumber, params) {
|
|
20
|
+
return await tvSeasonCredits(seriesId, seasonNumber, params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getExternalIds(seriesId, seasonNumber) {
|
|
23
|
+
return await tvSeasonExternalIds(seriesId, seasonNumber, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getImages(seriesId, seasonNumber, params) {
|
|
26
|
+
return await tvSeasonImages(seriesId, seasonNumber, params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getTranslations(seriesId, seasonNumber) {
|
|
29
|
+
return await tvSeasonTranslations(seriesId, seasonNumber, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getVideos(seriesId, seasonNumber, params) {
|
|
32
|
+
return await tvSeasonVideos(seriesId, seasonNumber, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async getWatchProviders(seriesId, seasonNumber, params) {
|
|
35
|
+
return await tvSeasonWatchProviders(seriesId, seasonNumber, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChangesTvListParams, TvSeriesAiringTodayListParams, TvSeriesOnTheAirListParams, TvSeriesPopularListParams, TvSeriesTopRatedListParams, TvSeriesDetailsParams, TvSeriesAccountStatesParams, TvSeriesAggregateCreditsParams, TvSeriesChangesParams, TvSeriesCreditsParams, TvSeriesImagesParams, ListsCopyParams, TvSeriesRecommendationsParams, TvSeriesReviewsParams, TvSeriesSimilarParams, TvSeriesVideosParams, TvSeriesAddRatingBody, TvSeriesAddRatingParams, TvSeriesDeleteRatingParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
import EpisodeService from "./episode-service";
|
|
4
|
+
import SeasonService from "./season-service";
|
|
5
|
+
export default class TVService {
|
|
6
|
+
private readonly defaultOptions;
|
|
7
|
+
episode: EpisodeService;
|
|
8
|
+
season: SeasonService;
|
|
9
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
10
|
+
getChangesTvList(params?: ChangesTvListParams): Promise<import("../../types").ChangesTvList200>;
|
|
11
|
+
getAiringTodayList(params?: TvSeriesAiringTodayListParams): Promise<import("../../types").TvSeriesAiringTodayList200>;
|
|
12
|
+
getOnTheAirList(params?: TvSeriesOnTheAirListParams): Promise<import("../../types").TvSeriesOnTheAirList200>;
|
|
13
|
+
getPopularList(params?: TvSeriesPopularListParams): Promise<import("../../types").TvSeriesPopularList200>;
|
|
14
|
+
getTopRatedList(params?: TvSeriesTopRatedListParams): Promise<import("../../types").TvSeriesTopRatedList200>;
|
|
15
|
+
getDetails(seriesId: number, params?: TvSeriesDetailsParams): Promise<import("../../types").TvSeriesDetails200>;
|
|
16
|
+
getAccountStates(seriesId: number, params?: TvSeriesAccountStatesParams): Promise<import("../../types").TvSeriesAccountStates200>;
|
|
17
|
+
getAggregateCredits(seriesId: number, params?: TvSeriesAggregateCreditsParams): Promise<import("../../types").TvSeriesAggregateCredits200>;
|
|
18
|
+
getAlternativeTitles(seriesId: number): Promise<import("../../types").TvSeriesAlternativeTitles200>;
|
|
19
|
+
getChanges(seriesId: number, params?: TvSeriesChangesParams): Promise<import("../../types").TvSeriesChanges200>;
|
|
20
|
+
getContentRatings(seriesId: number): Promise<import("../../types").TvSeriesContentRatings200>;
|
|
21
|
+
getCredits(seriesId: number, params?: TvSeriesCreditsParams): Promise<import("../../types").TvSeriesCredits200>;
|
|
22
|
+
getExternalIds(seriesId: number): Promise<import("../../types").TvSeriesExternalIds200>;
|
|
23
|
+
getImages(seriesId: number, params?: TvSeriesImagesParams): Promise<import("../../types").TvSeriesImages200>;
|
|
24
|
+
getKeywords(seriesId: number): Promise<import("../../types").TvSeriesKeywords200>;
|
|
25
|
+
getLatestId(): Promise<import("../../types").TvSeriesLatestId200>;
|
|
26
|
+
getListsCopy(seriesId: number, params?: ListsCopyParams): Promise<import("../../types").ListsCopy200>;
|
|
27
|
+
getRecommendations(seriesId: number, params?: TvSeriesRecommendationsParams): Promise<import("../../types").TvSeriesRecommendations200>;
|
|
28
|
+
getReviews(seriesId: number, params?: TvSeriesReviewsParams): Promise<import("../../types").TvSeriesReviews200>;
|
|
29
|
+
getScreenedTheatrically(seriesId: number): Promise<import("../../types").TvSeriesScreenedTheatrically200>;
|
|
30
|
+
getSimilar(seriesId: string, params?: TvSeriesSimilarParams): Promise<import("../../types").TvSeriesSimilar200>;
|
|
31
|
+
getTranslations(seriesId: number): Promise<import("../../types").TvSeriesTranslations200>;
|
|
32
|
+
getVideos(seriesId: number, params?: TvSeriesVideosParams): Promise<import("../../types").TvSeriesVideos200>;
|
|
33
|
+
getWatchProviders(seriesId: number): Promise<import("../../types").TvSeriesWatchProviders200>;
|
|
34
|
+
addRating(seriesId: number, tvSeriesAddRatingBody: TvSeriesAddRatingBody, params?: TvSeriesAddRatingParams): Promise<import("../../types").TvSeriesAddRating200>;
|
|
35
|
+
deleteRating(seriesId: number, params?: TvSeriesDeleteRatingParams): Promise<import("../../types").TvSeriesDeleteRating200>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { changesTvList, tvSeriesAiringTodayList, tvSeriesOnTheAirList, tvSeriesPopularList, tvSeriesTopRatedList, tvSeriesDetails, tvSeriesAccountStates, tvSeriesAggregateCredits, tvSeriesAlternativeTitles, tvSeriesChanges, tvSeriesContentRatings, tvSeriesCredits, tvSeriesExternalIds, tvSeriesImages, tvSeriesKeywords, tvSeriesLatestId, listsCopy, tvSeriesRecommendations, tvSeriesReviews, tvSeriesScreenedTheatrically, tvSeriesSimilar, tvSeriesTranslations, tvSeriesVideos, tvSeriesWatchProviders, tvSeriesAddRating, tvSeriesDeleteRating } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import EpisodeService from "./episode-service";
|
|
3
|
+
import SeasonService from "./season-service";
|
|
4
|
+
export default class TVService {
|
|
5
|
+
defaultOptions;
|
|
6
|
+
episode;
|
|
7
|
+
season;
|
|
8
|
+
constructor(defaultOptions) {
|
|
9
|
+
this.defaultOptions = defaultOptions;
|
|
10
|
+
this.episode = new EpisodeService(defaultOptions);
|
|
11
|
+
this.season = new SeasonService(defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getChangesTvList(params) {
|
|
14
|
+
return await changesTvList(params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getAiringTodayList(params) {
|
|
17
|
+
return await tvSeriesAiringTodayList(params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getOnTheAirList(params) {
|
|
20
|
+
return await tvSeriesOnTheAirList(params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getPopularList(params) {
|
|
23
|
+
return await tvSeriesPopularList(params, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getTopRatedList(params) {
|
|
26
|
+
return await tvSeriesTopRatedList(params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getDetails(seriesId, params) {
|
|
29
|
+
return await tvSeriesDetails(seriesId, params, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getAccountStates(seriesId, params) {
|
|
32
|
+
return await tvSeriesAccountStates(seriesId, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async getAggregateCredits(seriesId, params) {
|
|
35
|
+
return await tvSeriesAggregateCredits(seriesId, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
async getAlternativeTitles(seriesId) {
|
|
38
|
+
return await tvSeriesAlternativeTitles(seriesId, this.defaultOptions);
|
|
39
|
+
}
|
|
40
|
+
async getChanges(seriesId, params) {
|
|
41
|
+
return await tvSeriesChanges(seriesId, params, this.defaultOptions);
|
|
42
|
+
}
|
|
43
|
+
async getContentRatings(seriesId) {
|
|
44
|
+
return await tvSeriesContentRatings(seriesId, this.defaultOptions);
|
|
45
|
+
}
|
|
46
|
+
async getCredits(seriesId, params) {
|
|
47
|
+
return await tvSeriesCredits(seriesId, params, this.defaultOptions);
|
|
48
|
+
}
|
|
49
|
+
async getExternalIds(seriesId) {
|
|
50
|
+
return await tvSeriesExternalIds(seriesId, this.defaultOptions);
|
|
51
|
+
}
|
|
52
|
+
async getImages(seriesId, params) {
|
|
53
|
+
return await tvSeriesImages(seriesId, params, this.defaultOptions);
|
|
54
|
+
}
|
|
55
|
+
async getKeywords(seriesId) {
|
|
56
|
+
return await tvSeriesKeywords(seriesId, this.defaultOptions);
|
|
57
|
+
}
|
|
58
|
+
async getLatestId() {
|
|
59
|
+
return await tvSeriesLatestId(this.defaultOptions);
|
|
60
|
+
}
|
|
61
|
+
async getListsCopy(seriesId, params) {
|
|
62
|
+
return await listsCopy(seriesId, params, this.defaultOptions);
|
|
63
|
+
}
|
|
64
|
+
async getRecommendations(seriesId, params) {
|
|
65
|
+
return await tvSeriesRecommendations(seriesId, params, this.defaultOptions);
|
|
66
|
+
}
|
|
67
|
+
async getReviews(seriesId, params) {
|
|
68
|
+
return await tvSeriesReviews(seriesId, params, this.defaultOptions);
|
|
69
|
+
}
|
|
70
|
+
async getScreenedTheatrically(seriesId) {
|
|
71
|
+
return await tvSeriesScreenedTheatrically(seriesId, this.defaultOptions);
|
|
72
|
+
}
|
|
73
|
+
async getSimilar(seriesId, params) {
|
|
74
|
+
return await tvSeriesSimilar(seriesId, params, this.defaultOptions);
|
|
75
|
+
}
|
|
76
|
+
async getTranslations(seriesId) {
|
|
77
|
+
return await tvSeriesTranslations(seriesId, this.defaultOptions);
|
|
78
|
+
}
|
|
79
|
+
async getVideos(seriesId, params) {
|
|
80
|
+
return await tvSeriesVideos(seriesId, params, this.defaultOptions);
|
|
81
|
+
}
|
|
82
|
+
async getWatchProviders(seriesId) {
|
|
83
|
+
return await tvSeriesWatchProviders(seriesId, this.defaultOptions);
|
|
84
|
+
}
|
|
85
|
+
async addRating(seriesId, tvSeriesAddRatingBody, params) {
|
|
86
|
+
return await tvSeriesAddRating(seriesId, tvSeriesAddRatingBody, params, this.defaultOptions);
|
|
87
|
+
}
|
|
88
|
+
async deleteRating(seriesId, params) {
|
|
89
|
+
return await tvSeriesDeleteRating(seriesId, params, this.defaultOptions);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WatchProvidersAvailableRegionsParams, WatchProvidersMovieListParams, WatchProviderTvListParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class WatchService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getAvailableRegions(params?: WatchProvidersAvailableRegionsParams): Promise<import("../../types").WatchProvidersAvailableRegions200>;
|
|
7
|
+
getMovieList(params?: WatchProvidersMovieListParams): Promise<import("../../types").WatchProvidersMovieList200>;
|
|
8
|
+
getTvList(params?: WatchProviderTvListParams): Promise<import("../../types").WatchProviderTvList200>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { watchProvidersAvailableRegions, watchProvidersMovieList, watchProviderTvList } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class WatchService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getAvailableRegions(params) {
|
|
8
|
+
return await watchProvidersAvailableRegions(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getMovieList(params) {
|
|
11
|
+
return await watchProvidersMovieList(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getTvList(params) {
|
|
14
|
+
return await watchProviderTvList(params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CustomRequestInit } from './types';
|
|
2
|
+
import AccountService from './services/account/account-service';
|
|
3
|
+
import AuthenticationService from './services/authentication/authentication-service';
|
|
4
|
+
import CertificationService from './services/certification/certification-service';
|
|
5
|
+
import CollectionService from './services/collection/collection-service';
|
|
6
|
+
import CompanyService from './services/company/company-service';
|
|
7
|
+
import ConfigurationService from './services/configuration/configuration-service';
|
|
8
|
+
import CreditService from './services/credit/credit-service';
|
|
9
|
+
import DiscoverService from './services/dicover/discover-service';
|
|
10
|
+
import FindService from './services/find/find-service';
|
|
11
|
+
import GenreService from './services/genre/genre-service';
|
|
12
|
+
import GuestSessionService from './services/guest-session/guest-session-service';
|
|
13
|
+
import KeywordService from './services/keyword/keyword-service';
|
|
14
|
+
import ListService from './services/list/list-service';
|
|
15
|
+
import MovieService from './services/movie/movie-service';
|
|
16
|
+
import NetworkService from './services/network/network-service';
|
|
17
|
+
import PersonService from './services/person/person-service';
|
|
18
|
+
import ReviewService from './services/review/review-service';
|
|
19
|
+
import SearchService from './services/search/search-service';
|
|
20
|
+
import TrendingService from './services/trending/trending-service';
|
|
21
|
+
import TVService from './services/tv/tv-service';
|
|
22
|
+
import WatchService from './services/watch/watch-service';
|
|
23
|
+
export declare class TmdbClient {
|
|
24
|
+
readonly defaultOptions: CustomRequestInit;
|
|
25
|
+
account: AccountService;
|
|
26
|
+
authentication: AuthenticationService;
|
|
27
|
+
certification: CertificationService;
|
|
28
|
+
collection: CollectionService;
|
|
29
|
+
company: CompanyService;
|
|
30
|
+
configuration: ConfigurationService;
|
|
31
|
+
credit: CreditService;
|
|
32
|
+
discover: DiscoverService;
|
|
33
|
+
find: FindService;
|
|
34
|
+
genre: GenreService;
|
|
35
|
+
guestSession: GuestSessionService;
|
|
36
|
+
keyword: KeywordService;
|
|
37
|
+
list: ListService;
|
|
38
|
+
movie: MovieService;
|
|
39
|
+
network: NetworkService;
|
|
40
|
+
person: PersonService;
|
|
41
|
+
review: ReviewService;
|
|
42
|
+
search: SearchService;
|
|
43
|
+
trending: TrendingService;
|
|
44
|
+
tv: TVService;
|
|
45
|
+
watch: WatchService;
|
|
46
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
47
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import AccountService from './services/account/account-service';
|
|
2
|
+
import AuthenticationService from './services/authentication/authentication-service';
|
|
3
|
+
import CertificationService from './services/certification/certification-service';
|
|
4
|
+
import CollectionService from './services/collection/collection-service';
|
|
5
|
+
import CompanyService from './services/company/company-service';
|
|
6
|
+
import ConfigurationService from './services/configuration/configuration-service';
|
|
7
|
+
import CreditService from './services/credit/credit-service';
|
|
8
|
+
import DiscoverService from './services/dicover/discover-service';
|
|
9
|
+
import FindService from './services/find/find-service';
|
|
10
|
+
import GenreService from './services/genre/genre-service';
|
|
11
|
+
import GuestSessionService from './services/guest-session/guest-session-service';
|
|
12
|
+
import KeywordService from './services/keyword/keyword-service';
|
|
13
|
+
import ListService from './services/list/list-service';
|
|
14
|
+
import MovieService from './services/movie/movie-service';
|
|
15
|
+
import NetworkService from './services/network/network-service';
|
|
16
|
+
import PersonService from './services/person/person-service';
|
|
17
|
+
import ReviewService from './services/review/review-service';
|
|
18
|
+
import SearchService from './services/search/search-service';
|
|
19
|
+
import TrendingService from './services/trending/trending-service';
|
|
20
|
+
import TVService from './services/tv/tv-service';
|
|
21
|
+
import WatchService from './services/watch/watch-service';
|
|
22
|
+
export class TmdbClient {
|
|
23
|
+
defaultOptions;
|
|
24
|
+
account;
|
|
25
|
+
authentication;
|
|
26
|
+
certification;
|
|
27
|
+
collection;
|
|
28
|
+
company;
|
|
29
|
+
configuration;
|
|
30
|
+
credit;
|
|
31
|
+
discover;
|
|
32
|
+
find;
|
|
33
|
+
genre;
|
|
34
|
+
guestSession;
|
|
35
|
+
keyword;
|
|
36
|
+
list;
|
|
37
|
+
movie;
|
|
38
|
+
network;
|
|
39
|
+
person;
|
|
40
|
+
review;
|
|
41
|
+
search;
|
|
42
|
+
trending;
|
|
43
|
+
tv;
|
|
44
|
+
watch;
|
|
45
|
+
constructor(defaultOptions) {
|
|
46
|
+
this.defaultOptions = defaultOptions;
|
|
47
|
+
this.account = new AccountService(defaultOptions);
|
|
48
|
+
this.authentication = new AuthenticationService(defaultOptions);
|
|
49
|
+
this.certification = new CertificationService(defaultOptions);
|
|
50
|
+
this.collection = new CollectionService(defaultOptions);
|
|
51
|
+
this.company = new CompanyService(defaultOptions);
|
|
52
|
+
this.configuration = new ConfigurationService(defaultOptions);
|
|
53
|
+
this.credit = new CreditService(defaultOptions);
|
|
54
|
+
this.discover = new DiscoverService(defaultOptions);
|
|
55
|
+
this.find = new FindService(defaultOptions);
|
|
56
|
+
this.genre = new GenreService(defaultOptions);
|
|
57
|
+
this.guestSession = new GuestSessionService(defaultOptions);
|
|
58
|
+
this.keyword = new KeywordService(defaultOptions);
|
|
59
|
+
this.list = new ListService(defaultOptions);
|
|
60
|
+
this.movie = new MovieService(defaultOptions);
|
|
61
|
+
this.network = new NetworkService(defaultOptions);
|
|
62
|
+
this.person = new PersonService(defaultOptions);
|
|
63
|
+
this.review = new ReviewService(defaultOptions);
|
|
64
|
+
this.search = new SearchService(defaultOptions);
|
|
65
|
+
this.trending = new TrendingService(defaultOptions);
|
|
66
|
+
this.tv = new TVService(defaultOptions);
|
|
67
|
+
this.watch = new WatchService(defaultOptions);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface NextFetchRequestConfig {
|
|
2
|
+
revalidate?: number | false;
|
|
3
|
+
tags?: string[];
|
|
4
|
+
cache?: RequestCache;
|
|
5
|
+
next?: {
|
|
6
|
+
revalidate?: number | false;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export type CustomRequestInit = RequestInit & {
|
|
11
|
+
next?: NextFetchRequestConfig['next'];
|
|
12
|
+
cache?: NextFetchRequestConfig['cache'];
|
|
13
|
+
revalidate?: NextFetchRequestConfig['revalidate'];
|
|
14
|
+
tags?: NextFetchRequestConfig['tags'];
|
|
15
|
+
};
|
|
16
|
+
export type * from './__generated__/api/tmdbApi';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './client/tmdb-client';
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justwicked/tmdb-client",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A lightweight TypeScript Client for the TMDB API.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"clean": "rimraf dist",
|
|
21
|
+
"build": "npm run clean && npm run generate:api && tsc",
|
|
22
|
+
"prepare": "npm run build",
|
|
23
|
+
"format": "prettier . --write",
|
|
24
|
+
"generate:api": "rimraf ./src/client/__generated__/api ./src/client/__generated__/schema && orval"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/justwickedcode/tmdb-api-wrapper.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"tmdb",
|
|
32
|
+
"api",
|
|
33
|
+
"rest",
|
|
34
|
+
"wrapper"
|
|
35
|
+
],
|
|
36
|
+
"author": "justwickedcode",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"dotenv": "^17.2.3",
|
|
40
|
+
"orval": "^7.17.0",
|
|
41
|
+
"prettier": "^3.6.2",
|
|
42
|
+
"rimraf": "^6.0.1",
|
|
43
|
+
"typescript": "^5.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|