@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,17 @@
|
|
|
1
|
+
import { AccountDetailsParams, AccountAddFavoriteBody, AccountAddFavoriteParams, AccountAddToWatchlistBody, AccountAddToWatchlistParams, AccountGetFavoritesParams, AccountFavoriteTvParams, AccountListsParams, AccountRatedMoviesParams, AccountRatedTvParams, AccountRatedTvEpisodesParams, AccountWatchlistMoviesParams, AccountWatchlistTvParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class AccountService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getDetails(accountId: number, params: AccountDetailsParams): Promise<import("../../types").AccountDetails200>;
|
|
7
|
+
addFavorite(accountId: number, accountAddFavoriteBody: AccountAddFavoriteBody, params?: AccountAddFavoriteParams): Promise<import("../../types").AccountAddFavorite200>;
|
|
8
|
+
addToWatchlist(accountId: number, accountAddToWatchlistBody: AccountAddToWatchlistBody, params?: AccountAddToWatchlistParams): Promise<import("../../types").AccountAddToWatchlist200>;
|
|
9
|
+
getFavorites(accountId: number, params?: AccountGetFavoritesParams): Promise<import("../../types").AccountGetFavorites200>;
|
|
10
|
+
getFavoriteTv(accountId: number, params?: AccountFavoriteTvParams): Promise<import("../../types").AccountFavoriteTv200>;
|
|
11
|
+
getLists(accountId: number, params?: AccountListsParams): Promise<import("../../types").AccountLists200>;
|
|
12
|
+
getRatedMovies(accountId: number, params?: AccountRatedMoviesParams): Promise<import("../../types").AccountRatedMovies200>;
|
|
13
|
+
getRatedTv(accountId: number, params?: AccountRatedTvParams): Promise<import("../../types").AccountRatedTv200>;
|
|
14
|
+
getRatedTvEpisodes(accountId: number, params?: AccountRatedTvEpisodesParams): Promise<import("../../types").AccountRatedTvEpisodes200>;
|
|
15
|
+
getWatchlistMovies(accountId: number, params?: AccountWatchlistMoviesParams): Promise<import("../../types").AccountWatchlistMovies200>;
|
|
16
|
+
getWatchlistTv(accountId: number, params?: AccountWatchlistTvParams): Promise<import("../../types").AccountWatchlistTv200>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { accountDetails, accountAddFavorite, accountAddToWatchlist, accountGetFavorites, accountFavoriteTv, accountLists, accountRatedMovies, accountRatedTv, accountRatedTvEpisodes, accountWatchlistMovies, accountWatchlistTv } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class AccountService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(accountId, params) {
|
|
8
|
+
return await accountDetails(accountId, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async addFavorite(accountId, accountAddFavoriteBody, params) {
|
|
11
|
+
return await accountAddFavorite(accountId, accountAddFavoriteBody, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async addToWatchlist(accountId, accountAddToWatchlistBody, params) {
|
|
14
|
+
return await accountAddToWatchlist(accountId, accountAddToWatchlistBody, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getFavorites(accountId, params) {
|
|
17
|
+
return await accountGetFavorites(accountId, params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getFavoriteTv(accountId, params) {
|
|
20
|
+
return await accountFavoriteTv(accountId, params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getLists(accountId, params) {
|
|
23
|
+
return await accountLists(accountId, params, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getRatedMovies(accountId, params) {
|
|
26
|
+
return await accountRatedMovies(accountId, params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getRatedTv(accountId, params) {
|
|
29
|
+
return await accountRatedTv(accountId, params, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getRatedTvEpisodes(accountId, params) {
|
|
32
|
+
return await accountRatedTvEpisodes(accountId, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async getWatchlistMovies(accountId, params) {
|
|
35
|
+
return await accountWatchlistMovies(accountId, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
async getWatchlistTv(accountId, params) {
|
|
38
|
+
return await accountWatchlistTv(accountId, params, this.defaultOptions);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuthenticationCreateSessionBody, AuthenticationCreateSessionFromV4TokenBody, AuthenticationCreateSessionFromLoginBody, AuthenticationDeleteSessionBody } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class AuthenticationService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
validateKey(): Promise<import("../../types").AuthenticationValidateKey200>;
|
|
7
|
+
createGuestSession(): Promise<import("../../types").AuthenticationCreateGuestSession200>;
|
|
8
|
+
createRequestToken(): Promise<import("../../types").AuthenticationCreateRequestToken200>;
|
|
9
|
+
createSession(authenticationCreateSessionBody: AuthenticationCreateSessionBody): Promise<import("../../types").AuthenticationCreateSession200>;
|
|
10
|
+
createSessionFromV4Token(authenticationCreateSessionFromV4TokenBody: AuthenticationCreateSessionFromV4TokenBody): Promise<import("../../types").AuthenticationCreateSessionFromV4Token200>;
|
|
11
|
+
createSessionFromLogin(authenticationCreateSessionFromLoginBody: AuthenticationCreateSessionFromLoginBody): Promise<import("../../types").AuthenticationCreateSessionFromLogin200>;
|
|
12
|
+
deleteSession(authenticationDeleteSessionBody: AuthenticationDeleteSessionBody): Promise<import("../../types").AuthenticationDeleteSession200>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { authenticationValidateKey, authenticationCreateGuestSession, authenticationCreateRequestToken, authenticationCreateSession, authenticationCreateSessionFromV4Token, authenticationCreateSessionFromLogin, authenticationDeleteSession } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class AuthenticationService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async validateKey() {
|
|
8
|
+
return await authenticationValidateKey(this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async createGuestSession() {
|
|
11
|
+
return await authenticationCreateGuestSession(this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async createRequestToken() {
|
|
14
|
+
return await authenticationCreateRequestToken(this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async createSession(authenticationCreateSessionBody) {
|
|
17
|
+
return await authenticationCreateSession(authenticationCreateSessionBody, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async createSessionFromV4Token(authenticationCreateSessionFromV4TokenBody) {
|
|
20
|
+
return await authenticationCreateSessionFromV4Token(authenticationCreateSessionFromV4TokenBody, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async createSessionFromLogin(authenticationCreateSessionFromLoginBody) {
|
|
23
|
+
return await authenticationCreateSessionFromLogin(authenticationCreateSessionFromLoginBody, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async deleteSession(authenticationDeleteSessionBody) {
|
|
26
|
+
return await authenticationDeleteSession(authenticationDeleteSessionBody, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomRequestInit } from "../../types";
|
|
2
|
+
export default class CertificationService {
|
|
3
|
+
private readonly defaultOptions;
|
|
4
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
5
|
+
getMovieList(): Promise<import("../../types").CertificationMovieList200>;
|
|
6
|
+
getTvList(): Promise<import("../../types").CertificationsTvList200>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { certificationMovieList, certificationsTvList } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class CertificationService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getMovieList() {
|
|
8
|
+
return await certificationMovieList(this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getTvList() {
|
|
11
|
+
return await certificationsTvList(this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CollectionDetailsParams, CollectionImagesParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class CollectionService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getDetails(collectionId: number, params?: CollectionDetailsParams): Promise<import("../../types").CollectionDetails200>;
|
|
7
|
+
getImages(collectionId: number, params?: CollectionImagesParams): Promise<import("../../types").CollectionImages200>;
|
|
8
|
+
getTranslations(collectionId: number): Promise<import("../../types").CollectionTranslations200>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { collectionDetails, collectionImages, collectionTranslations } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class CollectionService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(collectionId, params) {
|
|
8
|
+
return await collectionDetails(collectionId, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getImages(collectionId, params) {
|
|
11
|
+
return await collectionImages(collectionId, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getTranslations(collectionId) {
|
|
14
|
+
return await collectionTranslations(collectionId, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomRequestInit } from "../../types";
|
|
2
|
+
export default class CompanyService {
|
|
3
|
+
private readonly defaultOptions;
|
|
4
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
5
|
+
getDetails(companyId: number): Promise<import("../../types").CompanyDetails200>;
|
|
6
|
+
getAlternativeNames(companyId: number): Promise<import("../../types").CompanyAlternativeNames200>;
|
|
7
|
+
getImages(companyId: number): Promise<import("../../types").CompanyImages200>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { companyDetails, companyAlternativeNames, companyImages } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class CompanyService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(companyId) {
|
|
8
|
+
return await companyDetails(companyId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getAlternativeNames(companyId) {
|
|
11
|
+
return await companyAlternativeNames(companyId, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getImages(companyId) {
|
|
14
|
+
return await companyImages(companyId, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConfigurationCountriesParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class ConfigurationService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getDetails(): Promise<import("../../types").ConfigurationDetails200>;
|
|
7
|
+
getCountries(params?: ConfigurationCountriesParams): Promise<import("../../types").ConfigurationCountries200Item[]>;
|
|
8
|
+
getJobs(): Promise<import("../../types").ConfigurationJobs200Item[]>;
|
|
9
|
+
getLanguages(): Promise<import("../../types").ConfigurationLanguages200Item[]>;
|
|
10
|
+
getPrimaryTranslations(): Promise<string[]>;
|
|
11
|
+
getTimezones(): Promise<import("../../types").ConfigurationTimezones200Item[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { configurationDetails, configurationCountries, configurationJobs, configurationLanguages, configurationPrimaryTranslations, configurationTimezones } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class ConfigurationService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails() {
|
|
8
|
+
return await configurationDetails(this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getCountries(params) {
|
|
11
|
+
return await configurationCountries(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getJobs() {
|
|
14
|
+
return await configurationJobs(this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getLanguages() {
|
|
17
|
+
return await configurationLanguages(this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getPrimaryTranslations() {
|
|
20
|
+
return await configurationPrimaryTranslations(this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getTimezones() {
|
|
23
|
+
return await configurationTimezones(this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { creditDetails } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class CreditService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(creditId) {
|
|
8
|
+
return await creditDetails(creditId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DiscoverMovieParams, DiscoverTvParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class DiscoverService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getMovie(params?: DiscoverMovieParams): Promise<import("../../types").DiscoverMovie200>;
|
|
7
|
+
getTv(params?: DiscoverTvParams): Promise<import("../../types").DiscoverTv200>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { discoverMovie, discoverTv } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class DiscoverService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getMovie(params) {
|
|
8
|
+
return await discoverMovie(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getTv(params) {
|
|
11
|
+
return await discoverTv(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FindByIdParams } from '../../__generated__/api/tmdbApi';
|
|
2
|
+
import { CustomRequestInit } from '../../types';
|
|
3
|
+
export default class FindService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
byId(externalId: string, params: FindByIdParams): Promise<import("../../types").FindById200>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { findById } from '../../__generated__/api/tmdbApi';
|
|
2
|
+
export default class FindService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async byId(externalId, params) {
|
|
8
|
+
return await findById(externalId, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenreMovieListParams, GenreTvListParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class GenreService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getMovieList(params?: GenreMovieListParams): Promise<import("../../types").GenreMovieList200>;
|
|
7
|
+
getTvList(params?: GenreTvListParams): Promise<import("../../types").GenreTvList200>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { genreMovieList, genreTvList } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class GenreService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getMovieList(params) {
|
|
8
|
+
return await genreMovieList(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getTvList(params) {
|
|
11
|
+
return await genreTvList(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GuestSessionRatedMoviesParams, GuestSessionRatedTvParams, GuestSessionRatedTvEpisodesParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class GuestSessionService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getRatedMovies(guestSessionId: string, params?: GuestSessionRatedMoviesParams): Promise<import("../../types").GuestSessionRatedMovies200>;
|
|
7
|
+
getRatedTv(guestSessionId: string, params?: GuestSessionRatedTvParams): Promise<import("../../types").GuestSessionRatedTv200>;
|
|
8
|
+
getTvEpisodes(guestSessionId: string, params?: GuestSessionRatedTvEpisodesParams): Promise<import("../../types").GuestSessionRatedTvEpisodes200>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { guestSessionRatedMovies, guestSessionRatedTv, guestSessionRatedTvEpisodes } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class GuestSessionService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getRatedMovies(guestSessionId, params) {
|
|
8
|
+
return await guestSessionRatedMovies(guestSessionId, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getRatedTv(guestSessionId, params) {
|
|
11
|
+
return await guestSessionRatedTv(guestSessionId, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getTvEpisodes(guestSessionId, params) {
|
|
14
|
+
return await guestSessionRatedTvEpisodes(guestSessionId, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KeywordMoviesParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class KeywordService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getDetails(keywordId: number): Promise<import("../../types").KeywordDetails200>;
|
|
7
|
+
getMovies(keywordId: string, params?: KeywordMoviesParams): Promise<import("../../types").KeywordMovies200>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { keywordDetails, keywordMovies } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class KeywordService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(keywordId) {
|
|
8
|
+
return await keywordDetails(keywordId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getMovies(keywordId, params) {
|
|
11
|
+
return await keywordMovies(keywordId, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ListAddMovieBody, ListAddMovieParams, ListCheckItemStatusParams, ListClearParams, ListCreateBody, ListCreateParams, ListDeleteParams, ListDetailsParams, ListRemoveMovieBody, ListRemoveMovieParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class ListService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
addMovie(listId: number, listAddMovieBody: ListAddMovieBody, params: ListAddMovieParams): Promise<import("../../types").ListAddMovie200>;
|
|
7
|
+
checkItemStatus(listId: number, params?: ListCheckItemStatusParams): Promise<import("../../types").ListCheckItemStatus200>;
|
|
8
|
+
clear(listId: number, params: ListClearParams): Promise<import("../../types").ListClear200>;
|
|
9
|
+
create(listCreateBody: ListCreateBody, params: ListCreateParams): Promise<import("../../types").ListCreate200>;
|
|
10
|
+
delete(listId: number, params: ListDeleteParams): Promise<import("../../types").ListDelete200>;
|
|
11
|
+
getDetails(listId: number, params?: ListDetailsParams): Promise<import("../../types").ListDetails200>;
|
|
12
|
+
removeMovie(listId: number, listRemoveMovieBody: ListRemoveMovieBody, params: ListRemoveMovieParams): Promise<import("../../types").ListRemoveMovie200>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { listAddMovie, listCheckItemStatus, listClear, listCreate, listDelete, listDetails, listRemoveMovie } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class ListService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async addMovie(listId, listAddMovieBody, params) {
|
|
8
|
+
return await listAddMovie(listId, listAddMovieBody, params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async checkItemStatus(listId, params) {
|
|
11
|
+
return await listCheckItemStatus(listId, params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async clear(listId, params) {
|
|
14
|
+
return await listClear(listId, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async create(listCreateBody, params) {
|
|
17
|
+
return await listCreate(listCreateBody, params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async delete(listId, params) {
|
|
20
|
+
return await listDelete(listId, params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getDetails(listId, params) {
|
|
23
|
+
return await listDetails(listId, params, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async removeMovie(listId, listRemoveMovieBody, params) {
|
|
26
|
+
return await listRemoveMovie(listId, listRemoveMovieBody, params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangesMovieListParams, MovieNowPlayingListParams, MoviePopularListParams, MovieTopRatedListParams, MovieUpcomingListParams, MovieDetailsParams, MovieAccountStatesParams, MovieAlternativeTitlesParams, MovieChangesParams, MovieCreditsParams, MovieImagesParams, MovieListsParams, MovieRecommendationsParams, MovieReviewsParams, MovieSimilarParams, MovieVideosParams, MovieAddRatingBody, MovieAddRatingParams, MovieDeleteRatingParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class MovieService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getChangesList(params?: ChangesMovieListParams): Promise<import("../../types").ChangesMovieList200>;
|
|
7
|
+
getNowPlayingList(params?: MovieNowPlayingListParams): Promise<import("../../types").MovieNowPlayingList200>;
|
|
8
|
+
getPopularList(params?: MoviePopularListParams): Promise<import("../../types").MoviePopularList200>;
|
|
9
|
+
getTopRatedList(params?: MovieTopRatedListParams): Promise<import("../../types").MovieTopRatedList200>;
|
|
10
|
+
getUpcomingList(params?: MovieUpcomingListParams): Promise<import("../../types").MovieUpcomingList200>;
|
|
11
|
+
getDetails(movieId: number, params?: MovieDetailsParams): Promise<import("../../types").MovieDetails200>;
|
|
12
|
+
getAccountStates(movieId: number, params?: MovieAccountStatesParams): Promise<import("../../types").MovieAccountStates200>;
|
|
13
|
+
getAlternativeTitles(movieId: number, params?: MovieAlternativeTitlesParams): Promise<import("../../types").MovieAlternativeTitles200>;
|
|
14
|
+
getChanges(movieId: number, params?: MovieChangesParams): Promise<import("../../types").MovieChanges200>;
|
|
15
|
+
getCredits(movieId: number, params?: MovieCreditsParams): Promise<import("../../types").MovieCredits200>;
|
|
16
|
+
getExternalIds(movieId: number): Promise<import("../../types").MovieExternalIds200>;
|
|
17
|
+
getImages(movieId: number, params?: MovieImagesParams): Promise<import("../../types").MovieImages200>;
|
|
18
|
+
getKeywords(movieId: string): Promise<import("../../types").MovieKeywords200>;
|
|
19
|
+
getLatestId(): Promise<import("../../types").MovieLatestId200>;
|
|
20
|
+
getLists(movieId: number, params?: MovieListsParams): Promise<import("../../types").MovieLists200>;
|
|
21
|
+
getRecommendations(movieId: number, params?: MovieRecommendationsParams): Promise<import("../../types").MovieRecommendations200>;
|
|
22
|
+
getReleaseDates(movieId: number): Promise<import("../../types").MovieReleaseDates200>;
|
|
23
|
+
getReviews(movieId: number, params?: MovieReviewsParams): Promise<import("../../types").MovieReviews200>;
|
|
24
|
+
getSimilar(movieId: number, params?: MovieSimilarParams): Promise<import("../../types").MovieSimilar200>;
|
|
25
|
+
getTranslations(movieId: number): Promise<import("../../types").MovieTranslations200>;
|
|
26
|
+
getVideos(movieId: number, params?: MovieVideosParams): Promise<import("../../types").MovieVideos200>;
|
|
27
|
+
getWatchProviders(movieId: number): Promise<import("../../types").MovieWatchProviders200>;
|
|
28
|
+
addRating(movieId: number, movieAddRatingBody: MovieAddRatingBody, params?: MovieAddRatingParams): Promise<import("../../types").MovieAddRating200>;
|
|
29
|
+
deleteRating(movieId: number, params?: MovieDeleteRatingParams): Promise<import("../../types").MovieDeleteRating200>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { changesMovieList, movieNowPlayingList, moviePopularList, movieTopRatedList, movieUpcomingList, movieDetails, movieAccountStates, movieAlternativeTitles, movieChanges, movieCredits, movieExternalIds, movieImages, movieKeywords, movieLatestId, movieLists, movieRecommendations, movieReleaseDates, movieReviews, movieSimilar, movieTranslations, movieVideos, movieWatchProviders, movieAddRating, movieDeleteRating } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class MovieService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getChangesList(params) {
|
|
8
|
+
return await changesMovieList(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getNowPlayingList(params) {
|
|
11
|
+
return await movieNowPlayingList(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getPopularList(params) {
|
|
14
|
+
return await moviePopularList(params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getTopRatedList(params) {
|
|
17
|
+
return await movieTopRatedList(params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getUpcomingList(params) {
|
|
20
|
+
return await movieUpcomingList(params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getDetails(movieId, params) {
|
|
23
|
+
return await movieDetails(movieId, params, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getAccountStates(movieId, params) {
|
|
26
|
+
return await movieAccountStates(movieId, params, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getAlternativeTitles(movieId, params) {
|
|
29
|
+
return await movieAlternativeTitles(movieId, params, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getChanges(movieId, params) {
|
|
32
|
+
return await movieChanges(movieId, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async getCredits(movieId, params) {
|
|
35
|
+
return await movieCredits(movieId, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
async getExternalIds(movieId) {
|
|
38
|
+
return await movieExternalIds(movieId, this.defaultOptions);
|
|
39
|
+
}
|
|
40
|
+
async getImages(movieId, params) {
|
|
41
|
+
return await movieImages(movieId, params, this.defaultOptions);
|
|
42
|
+
}
|
|
43
|
+
async getKeywords(movieId) {
|
|
44
|
+
return await movieKeywords(movieId, this.defaultOptions);
|
|
45
|
+
}
|
|
46
|
+
async getLatestId() {
|
|
47
|
+
return await movieLatestId(this.defaultOptions);
|
|
48
|
+
}
|
|
49
|
+
async getLists(movieId, params) {
|
|
50
|
+
return await movieLists(movieId, params, this.defaultOptions);
|
|
51
|
+
}
|
|
52
|
+
async getRecommendations(movieId, params) {
|
|
53
|
+
return await movieRecommendations(movieId, params, this.defaultOptions);
|
|
54
|
+
}
|
|
55
|
+
async getReleaseDates(movieId) {
|
|
56
|
+
return await movieReleaseDates(movieId, this.defaultOptions);
|
|
57
|
+
}
|
|
58
|
+
async getReviews(movieId, params) {
|
|
59
|
+
return await movieReviews(movieId, params, this.defaultOptions);
|
|
60
|
+
}
|
|
61
|
+
async getSimilar(movieId, params) {
|
|
62
|
+
return await movieSimilar(movieId, params, this.defaultOptions);
|
|
63
|
+
}
|
|
64
|
+
async getTranslations(movieId) {
|
|
65
|
+
return await movieTranslations(movieId, this.defaultOptions);
|
|
66
|
+
}
|
|
67
|
+
async getVideos(movieId, params) {
|
|
68
|
+
return await movieVideos(movieId, params, this.defaultOptions);
|
|
69
|
+
}
|
|
70
|
+
async getWatchProviders(movieId) {
|
|
71
|
+
return await movieWatchProviders(movieId, this.defaultOptions);
|
|
72
|
+
}
|
|
73
|
+
async addRating(movieId, movieAddRatingBody, params) {
|
|
74
|
+
return await movieAddRating(movieId, movieAddRatingBody, params, this.defaultOptions);
|
|
75
|
+
}
|
|
76
|
+
async deleteRating(movieId, params) {
|
|
77
|
+
return await movieDeleteRating(movieId, params, this.defaultOptions);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomRequestInit } from "../../types";
|
|
2
|
+
export default class NetworkService {
|
|
3
|
+
private readonly defaultOptions;
|
|
4
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
5
|
+
getDetails(networkId: number): Promise<import("../../types").NetworkDetails200>;
|
|
6
|
+
getDetailsCopy(networkId: number): Promise<import("../../types").DetailsCopy200>;
|
|
7
|
+
getAlternativeNamesCopy(networkId: number): Promise<import("../../types").AlternativeNamesCopy200>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { networkDetails, detailsCopy, alternativeNamesCopy } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class NetworkService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getDetails(networkId) {
|
|
8
|
+
return await networkDetails(networkId, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getDetailsCopy(networkId) {
|
|
11
|
+
return await detailsCopy(networkId, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getAlternativeNamesCopy(networkId) {
|
|
14
|
+
return await alternativeNamesCopy(networkId, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangesPeopleListParams, PersonPopularListParams, PersonDetailsParams, PersonChangesParams, PersonCombinedCreditsParams, PersonMovieCreditsParams, PersonTvCreditsParams, PersonTaggedImagesParams } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
import { CustomRequestInit } from "../../types";
|
|
3
|
+
export default class PersonService {
|
|
4
|
+
private readonly defaultOptions;
|
|
5
|
+
constructor(defaultOptions: CustomRequestInit);
|
|
6
|
+
getChangesPeopleList(params?: ChangesPeopleListParams): Promise<import("../../types").ChangesPeopleList200>;
|
|
7
|
+
getPopularList(params?: PersonPopularListParams): Promise<import("../../types").PersonPopularList200>;
|
|
8
|
+
getDetails(personId: number, params?: PersonDetailsParams): Promise<import("../../types").PersonDetails200>;
|
|
9
|
+
getChanges(personId: number, params?: PersonChangesParams): Promise<import("../../types").PersonChanges200>;
|
|
10
|
+
getCombinedCredits(personId: string, params?: PersonCombinedCreditsParams): Promise<import("../../types").PersonCombinedCredits200>;
|
|
11
|
+
getExternalIds(personId: number): Promise<import("../../types").PersonExternalIds200>;
|
|
12
|
+
getImages(personId: number): Promise<import("../../types").PersonImages200>;
|
|
13
|
+
getLatestId(): Promise<import("../../types").PersonLatestId200>;
|
|
14
|
+
getMovieCredits(personId: number, params?: PersonMovieCreditsParams): Promise<import("../../types").PersonMovieCredits200>;
|
|
15
|
+
getTvCredits(personId: number, params?: PersonTvCreditsParams): Promise<import("../../types").PersonTvCredits200>;
|
|
16
|
+
getTaggedImages(personId: number, params?: PersonTaggedImagesParams): Promise<import("../../types").PersonTaggedImages200>;
|
|
17
|
+
getTranslations(personId: number): Promise<import("../../types").Translations200>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { changesPeopleList, personPopularList, personDetails, personChanges, personCombinedCredits, personExternalIds, personImages, personLatestId, personMovieCredits, personTvCredits, personTaggedImages, translations } from "../../__generated__/api/tmdbApi";
|
|
2
|
+
export default class PersonService {
|
|
3
|
+
defaultOptions;
|
|
4
|
+
constructor(defaultOptions) {
|
|
5
|
+
this.defaultOptions = defaultOptions;
|
|
6
|
+
}
|
|
7
|
+
async getChangesPeopleList(params) {
|
|
8
|
+
return await changesPeopleList(params, this.defaultOptions);
|
|
9
|
+
}
|
|
10
|
+
async getPopularList(params) {
|
|
11
|
+
return await personPopularList(params, this.defaultOptions);
|
|
12
|
+
}
|
|
13
|
+
async getDetails(personId, params) {
|
|
14
|
+
return await personDetails(personId, params, this.defaultOptions);
|
|
15
|
+
}
|
|
16
|
+
async getChanges(personId, params) {
|
|
17
|
+
return await personChanges(personId, params, this.defaultOptions);
|
|
18
|
+
}
|
|
19
|
+
async getCombinedCredits(personId, params) {
|
|
20
|
+
return await personCombinedCredits(personId, params, this.defaultOptions);
|
|
21
|
+
}
|
|
22
|
+
async getExternalIds(personId) {
|
|
23
|
+
return await personExternalIds(personId, this.defaultOptions);
|
|
24
|
+
}
|
|
25
|
+
async getImages(personId) {
|
|
26
|
+
return await personImages(personId, this.defaultOptions);
|
|
27
|
+
}
|
|
28
|
+
async getLatestId() {
|
|
29
|
+
return await personLatestId(this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
async getMovieCredits(personId, params) {
|
|
32
|
+
return await personMovieCredits(personId, params, this.defaultOptions);
|
|
33
|
+
}
|
|
34
|
+
async getTvCredits(personId, params) {
|
|
35
|
+
return await personTvCredits(personId, params, this.defaultOptions);
|
|
36
|
+
}
|
|
37
|
+
async getTaggedImages(personId, params) {
|
|
38
|
+
return await personTaggedImages(personId, params, this.defaultOptions);
|
|
39
|
+
}
|
|
40
|
+
async getTranslations(personId) {
|
|
41
|
+
return await translations(personId, this.defaultOptions);
|
|
42
|
+
}
|
|
43
|
+
}
|