@tdanks2000/tmdb-wrapper 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +334 -148
- package/dist/@types/models/baseEndpoint.d.ts.map +1 -1
- package/dist/endpoints/account.d.ts.map +1 -1
- package/dist/endpoints/certification.d.ts.map +1 -1
- package/dist/endpoints/changes.d.ts.map +1 -1
- package/dist/endpoints/collections.d.ts.map +1 -1
- package/dist/endpoints/collections.js +1 -1
- package/dist/endpoints/companies.d.ts.map +1 -1
- package/dist/endpoints/configuration.d.ts.map +1 -1
- package/dist/endpoints/credits.d.ts.map +1 -1
- package/dist/endpoints/discover.d.ts.map +1 -1
- package/dist/endpoints/find.d.ts.map +1 -1
- package/dist/endpoints/genre.d.ts.map +1 -1
- package/dist/endpoints/index.d.ts +3 -0
- package/dist/endpoints/index.d.ts.map +1 -1
- package/dist/endpoints/index.js +3 -0
- package/dist/endpoints/keywords.d.ts.map +1 -1
- package/dist/endpoints/movies.d.ts.map +1 -1
- package/dist/endpoints/movies.js +1 -1
- package/dist/endpoints/networks.d.ts.map +1 -1
- package/dist/endpoints/people.d.ts.map +1 -1
- package/dist/endpoints/review.d.ts.map +1 -1
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/trending.d.ts.map +1 -1
- package/dist/endpoints/tvEpisodes.d.ts.map +1 -1
- package/dist/endpoints/tvEpisodes.js +2 -2
- package/dist/endpoints/tvSeasons.d.ts.map +1 -1
- package/dist/endpoints/tvSeasons.js +2 -2
- package/dist/endpoints/tvShows.d.ts.map +1 -1
- package/dist/endpoints/tvShows.js +2 -2
- package/dist/endpoints/watchProviders.d.ts +33 -0
- package/dist/endpoints/watchProviders.d.ts.map +1 -0
- package/dist/endpoints/watchProviders.js +63 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/getimagePath.d.ts +24 -4
- package/dist/utils/getimagePath.d.ts.map +1 -1
- package/dist/utils/getimagePath.js +39 -8
- package/package.json +28 -10
- package/src/@types/endpoints/account.ts +0 -17
- package/src/@types/endpoints/certification.ts +0 -19
- package/src/@types/endpoints/changes.ts +0 -29
- package/src/@types/endpoints/collection.ts +0 -23
- package/src/@types/endpoints/companies.ts +0 -33
- package/src/@types/endpoints/configuration.ts +0 -112
- package/src/@types/endpoints/credits.ts +0 -149
- package/src/@types/endpoints/discover.ts +0 -87
- package/src/@types/endpoints/find.ts +0 -28
- package/src/@types/endpoints/genre.ts +0 -3
- package/src/@types/endpoints/index.ts +0 -22
- package/src/@types/endpoints/keywords.ts +0 -24
- package/src/@types/endpoints/movies.ts +0 -169
- package/src/@types/endpoints/networks.ts +0 -15
- package/src/@types/endpoints/options.ts +0 -189
- package/src/@types/endpoints/people.ts +0 -151
- package/src/@types/endpoints/review.ts +0 -8
- package/src/@types/endpoints/search.ts +0 -39
- package/src/@types/endpoints/trending.ts +0 -20
- package/src/@types/endpoints/tvEpisode.ts +0 -72
- package/src/@types/endpoints/tvSeasons.ts +0 -37
- package/src/@types/endpoints/tvShows.ts +0 -284
- package/src/@types/endpoints/watchProviders.ts +0 -298
- package/src/@types/index.ts +0 -3
- package/src/@types/models/baseEndpoint.ts +0 -9
- package/src/@types/models/index.ts +0 -1
- package/src/@types/types.ts +0 -199
- package/src/endpoints/account.ts +0 -22
- package/src/endpoints/certification.ts +0 -30
- package/src/endpoints/changes.ts +0 -41
- package/src/endpoints/collections.ts +0 -57
- package/src/endpoints/companies.ts +0 -41
- package/src/endpoints/configuration.ts +0 -22
- package/src/endpoints/credits.ts +0 -23
- package/src/endpoints/discover.ts +0 -40
- package/src/endpoints/find.ts +0 -24
- package/src/endpoints/genre.ts +0 -32
- package/src/endpoints/index.ts +0 -18
- package/src/endpoints/keywords.ts +0 -35
- package/src/endpoints/movies.ts +0 -244
- package/src/endpoints/networks.ts +0 -41
- package/src/endpoints/people.ts +0 -147
- package/src/endpoints/review.ts +0 -23
- package/src/endpoints/search.ts +0 -93
- package/src/endpoints/trending.ts +0 -30
- package/src/endpoints/tvEpisodes.ts +0 -125
- package/src/endpoints/tvSeasons.ts +0 -138
- package/src/endpoints/tvShows.ts +0 -286
- package/src/index.ts +0 -66
- package/src/utils/api.ts +0 -31
- package/src/utils/getimagePath.ts +0 -16
- package/src/utils/index.ts +0 -2
- package/tsconfig.json +0 -108
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/endpoints/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/endpoints/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1F;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAKpC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;;OAIG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlD;;;;OAIG;IACG,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI7D;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/endpoints/people.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,UAAU,EAC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G,OAAO,CAAC,WAAW,CAAC;IAIlD;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/C;;;;;OAKG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;IAI3E;;;;OAIG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI1D;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC;IAItC;;;;OAIG;IACG,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC;CAG9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/endpoints/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/endpoints/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAExD;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;OAIG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/endpoints/search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,MAAM,EACN,aAAa,EACb,EAAE,EACF,eAAe,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/endpoints/search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,MAAM,EACN,aAAa,EACb,EAAE,EACF,eAAe,EAChB,MAAM,WAAW,CAAC;AAInB;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAKlC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAIjE;;;;OAIG;IACG,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAItE;;;;OAIG;IACG,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAIrF;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAIjE;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAInE;;;;OAIG;IACG,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAIvD;;;;OAIG;IACG,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;CAG7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trending.d.ts","sourceRoot":"","sources":["../../src/endpoints/trending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"trending.d.ts","sourceRoot":"","sources":["../../src/endpoints/trending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAErH;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;;;OAOG;IACG,QAAQ,CAAC,CAAC,SAAS,iBAAiB,EACxC,SAAS,EAAE,CAAC,EACZ,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,GACpC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAG/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tvEpisodes.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvEpisodes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,cAAc,EAEd,eAAe,EACf,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,MAAM,EACP,MAAM,
|
|
1
|
+
{"version":3,"file":"tvEpisodes.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvEpisodes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,cAAc,EAEd,eAAe,EACf,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,MAAM,EACP,MAAM,WAAW,CAAC;AAMnB;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,YAAY;IAClD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;;;OAOG;IACG,OAAO,CAAC,CAAC,SAAS,4BAA4B,EAAE,GAAG,SAAS,EAChE,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,CAAC,EAAE,CAAC,EACpB,OAAO,CAAC,EAAE,cAAc;IAa1B;;;;;OAKG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;IAIvD;;;;;OAKG;IACG,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc;IAI1E;;;;OAIG;IACG,WAAW,CAAC,gBAAgB,EAAE,gBAAgB;IAIpD;;;;;OAKG;IACG,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,2BAA2B;IAQtF;;;;OAIG;IACG,YAAY,CAAC,gBAAgB,EAAE,gBAAgB;IAIrD;;;;;OAKG;IACG,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,2BAA2B;CAOvF"}
|
|
@@ -78,8 +78,8 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
|
|
|
78
78
|
* @returns {Promise<Images>} A Promise that resolves with the images for the TV episode.
|
|
79
79
|
*/
|
|
80
80
|
images(episodeSelection, options) {
|
|
81
|
-
var _a;
|
|
82
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a;
|
|
83
83
|
const computedOptions = {
|
|
84
84
|
include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
85
85
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -104,8 +104,8 @@ class TvEpisodesEndpoint extends _types_1.BaseEndpoint {
|
|
|
104
104
|
* @returns {Promise<Videos>} A Promise that resolves with the videos for the TV episode.
|
|
105
105
|
*/
|
|
106
106
|
videos(episodeSelection, options) {
|
|
107
|
-
var _a;
|
|
108
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a;
|
|
109
109
|
const computedOptions = {
|
|
110
110
|
include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
111
111
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tvSeasons.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvSeasons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,WAAW,EACX,MAAM,EACN,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,MAAM,EACP,MAAM,
|
|
1
|
+
{"version":3,"file":"tvSeasons.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvSeasons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,WAAW,EACX,MAAM,EACN,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,MAAM,EACP,MAAM,WAAW,CAAC;AAMnB;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;;;OAOG;IACG,OAAO,CAAC,CAAC,SAAS,2BAA2B,EAAE,GAAG,SAAS,EAC/D,eAAe,EAAE,eAAe,EAChC,gBAAgB,CAAC,EAAE,CAAC,EACpB,OAAO,CAAC,EAAE,cAAc;IAa1B;;;;;OAKG;IACG,gBAAgB,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc;IAIjF;;;;;OAKG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;IAItD;;;;;OAKG;IACG,OAAO,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc;IAIxE;;;;;OAKG;IACG,WAAW,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc;IAI5E;;;;;OAKG;IACG,MAAM,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,0BAA0B;IAQnF;;;;;OAKG;IACG,MAAM,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,0BAA0B;IAQnF;;;;;OAKG;IACG,YAAY,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc;CAG9E"}
|
|
@@ -90,8 +90,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
|
|
|
90
90
|
* @returns {Promise<Images>} A Promise that resolves with the images for the TV season.
|
|
91
91
|
*/
|
|
92
92
|
images(seasonSelection, options) {
|
|
93
|
-
var _a;
|
|
94
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
var _a;
|
|
95
95
|
const computedOptions = {
|
|
96
96
|
include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
97
97
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -106,8 +106,8 @@ class TvSeasonsEndpoint extends _types_1.BaseEndpoint {
|
|
|
106
106
|
* @returns {Promise<Videos>} A Promise that resolves with the videos for the TV season.
|
|
107
107
|
*/
|
|
108
108
|
videos(seasonSelection, options) {
|
|
109
|
-
var _a;
|
|
110
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
var _a;
|
|
111
111
|
const computedOptions = {
|
|
112
112
|
include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
113
113
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tvShows.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvShows.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,EACb,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,aAAa,EACd,MAAM,
|
|
1
|
+
{"version":3,"file":"tvShows.d.ts","sourceRoot":"","sources":["../../src/endpoints/tvShows.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,EACb,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,aAAa,EACd,MAAM,WAAW,CAAC;AAInB;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAKnC,S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G;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;CAG3E"}
|
|
@@ -133,8 +133,8 @@ class TvShowsEndpoint extends _types_1.BaseEndpoint {
|
|
|
133
133
|
* @returns {Promise<Images>} A Promise that resolves with the images of the TV show.
|
|
134
134
|
*/
|
|
135
135
|
images(id, options) {
|
|
136
|
-
var _a;
|
|
137
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
var _a;
|
|
138
138
|
const computedOptions = {
|
|
139
139
|
include_image_language: (_a = options === null || options === void 0 ? void 0 : options.include_image_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
140
140
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -212,8 +212,8 @@ class TvShowsEndpoint extends _types_1.BaseEndpoint {
|
|
|
212
212
|
* @returns {Promise<Videos>} A Promise that resolves with the videos of the TV show.
|
|
213
213
|
*/
|
|
214
214
|
videos(id, options) {
|
|
215
|
-
var _a;
|
|
216
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
var _a;
|
|
217
217
|
const computedOptions = {
|
|
218
218
|
include_video_language: (_a = options === null || options === void 0 ? void 0 : options.include_video_language) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
219
219
|
language: options === null || options === void 0 ? void 0 : options.language,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseEndpoint, WatchProviders } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing watch provider information.
|
|
4
|
+
*/
|
|
5
|
+
export declare class WatchProvidersEndpoint extends BaseEndpoint {
|
|
6
|
+
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new WatchProvidersEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
11
|
+
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a list of all available watch providers (streaming services).
|
|
14
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of watch providers.
|
|
15
|
+
*/
|
|
16
|
+
available(): Promise<WatchProviders>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a list of available regions for watch providers.
|
|
19
|
+
* @returns {Promise<any>} A Promise that resolves with the list of available regions.
|
|
20
|
+
*/
|
|
21
|
+
regions(): Promise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a list of watch providers for movies.
|
|
24
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of movie watch providers.
|
|
25
|
+
*/
|
|
26
|
+
movie(): Promise<WatchProviders>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a list of watch providers for TV shows.
|
|
29
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of TV watch providers.
|
|
30
|
+
*/
|
|
31
|
+
tv(): Promise<WatchProviders>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=watchProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchProviders.d.ts","sourceRoot":"","sources":["../../src/endpoints/watchProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,YAAY;IAK1C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC;IAI1C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;IAI7B;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,cAAc,CAAC;IAItC;;;OAGG;IACG,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC;CAGpC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WatchProvidersEndpoint = void 0;
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for accessing watch provider information.
|
|
16
|
+
*/
|
|
17
|
+
class WatchProvidersEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new WatchProvidersEndpoint instance.
|
|
20
|
+
* @param {string} access_token - The access token used for authentication.
|
|
21
|
+
*/
|
|
22
|
+
constructor(access_token) {
|
|
23
|
+
super(access_token);
|
|
24
|
+
this.access_token = access_token;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves a list of all available watch providers (streaming services).
|
|
28
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of watch providers.
|
|
29
|
+
*/
|
|
30
|
+
available() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield this.api.get('/watch/providers/movie');
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves a list of available regions for watch providers.
|
|
37
|
+
* @returns {Promise<any>} A Promise that resolves with the list of available regions.
|
|
38
|
+
*/
|
|
39
|
+
regions() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return yield this.api.get('/watch/providers/regions');
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves a list of watch providers for movies.
|
|
46
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of movie watch providers.
|
|
47
|
+
*/
|
|
48
|
+
movie() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this.api.get('/watch/providers/movie');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves a list of watch providers for TV shows.
|
|
55
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the list of TV watch providers.
|
|
56
|
+
*/
|
|
57
|
+
tv() {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return yield this.api.get('/watch/providers/tv');
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.WatchProvidersEndpoint = WatchProvidersEndpoint;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CollectionsEndpoint, ConfigurationEndpoint, CreditsEndpoint, DiscoverEndpoint, FindEndpoint, GenreEndpoint, KeywordsEndpoint, MoviesEndpoint, PeopleEndpoint, ReviewEndpoint, SearchEndpoint, TrendingEndpoint, TvEpisodesEndpoint, TvSeasonsEndpoint, TvShowsEndpoint } from './endpoints';
|
|
1
|
+
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CollectionsEndpoint, CompaniesEndpoint, ConfigurationEndpoint, CreditsEndpoint, DiscoverEndpoint, FindEndpoint, GenreEndpoint, KeywordsEndpoint, MoviesEndpoint, NetworksEndpoint, PeopleEndpoint, ReviewEndpoint, SearchEndpoint, TrendingEndpoint, TvEpisodesEndpoint, TvSeasonsEndpoint, TvShowsEndpoint, WatchProvidersEndpoint } from './endpoints';
|
|
2
2
|
declare class TMDB {
|
|
3
3
|
constructor(access_token: string);
|
|
4
4
|
account: AccountEndpoint;
|
|
5
5
|
certification: CertificationEndpoint;
|
|
6
6
|
changes: ChangeEndpoint;
|
|
7
7
|
collections: CollectionsEndpoint;
|
|
8
|
+
companies: CompaniesEndpoint;
|
|
8
9
|
configuration: ConfigurationEndpoint;
|
|
9
10
|
credits: CreditsEndpoint;
|
|
10
11
|
discover: DiscoverEndpoint;
|
|
@@ -12,6 +13,7 @@ declare class TMDB {
|
|
|
12
13
|
genre: GenreEndpoint;
|
|
13
14
|
keywords: KeywordsEndpoint;
|
|
14
15
|
movies: MoviesEndpoint;
|
|
16
|
+
networks: NetworksEndpoint;
|
|
15
17
|
people: PeopleEndpoint;
|
|
16
18
|
review: ReviewEndpoint;
|
|
17
19
|
search: SearchEndpoint;
|
|
@@ -19,6 +21,7 @@ declare class TMDB {
|
|
|
19
21
|
tvEpisodes: TvEpisodesEndpoint;
|
|
20
22
|
tvSeasons: TvSeasonsEndpoint;
|
|
21
23
|
tvShows: TvShowsEndpoint;
|
|
24
|
+
watchProviders: WatchProvidersEndpoint;
|
|
22
25
|
}
|
|
23
26
|
export * from './@types';
|
|
24
27
|
export * from './utils';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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,EACvB,MAAM,aAAa,CAAC;AAErB,cAAM,IAAI;gBACI,YAAY,EAAE,MAAM;IAwBhC,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;CACxC;AAED,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ class TMDB {
|
|
|
22
22
|
this.certification = new endpoints_1.CertificationEndpoint(access_token);
|
|
23
23
|
this.changes = new endpoints_1.ChangeEndpoint(access_token);
|
|
24
24
|
this.collections = new endpoints_1.CollectionsEndpoint(access_token);
|
|
25
|
+
this.companies = new endpoints_1.CompaniesEndpoint(access_token);
|
|
25
26
|
this.configuration = new endpoints_1.ConfigurationEndpoint(access_token);
|
|
26
27
|
this.credits = new endpoints_1.CreditsEndpoint(access_token);
|
|
27
28
|
this.discover = new endpoints_1.DiscoverEndpoint(access_token);
|
|
@@ -29,6 +30,7 @@ class TMDB {
|
|
|
29
30
|
this.genre = new endpoints_1.GenreEndpoint(access_token);
|
|
30
31
|
this.keywords = new endpoints_1.KeywordsEndpoint(access_token);
|
|
31
32
|
this.movies = new endpoints_1.MoviesEndpoint(access_token);
|
|
33
|
+
this.networks = new endpoints_1.NetworksEndpoint(access_token);
|
|
32
34
|
this.people = new endpoints_1.PeopleEndpoint(access_token);
|
|
33
35
|
this.review = new endpoints_1.ReviewEndpoint(access_token);
|
|
34
36
|
this.search = new endpoints_1.SearchEndpoint(access_token);
|
|
@@ -36,6 +38,7 @@ class TMDB {
|
|
|
36
38
|
this.tvEpisodes = new endpoints_1.TvEpisodesEndpoint(access_token);
|
|
37
39
|
this.tvSeasons = new endpoints_1.TvSeasonsEndpoint(access_token);
|
|
38
40
|
this.tvShows = new endpoints_1.TvShowsEndpoint(access_token);
|
|
41
|
+
this.watchProviders = new endpoints_1.WatchProvidersEndpoint(access_token);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
exports.TMDB = TMDB;
|
package/dist/utils/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":"AAIA,qBAAa,GAAG;IACd,OAAO,CAAC,YAAY,CAAS;gBACjB,YAAY,EAAE,MAAM;IAI1B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAgBtE;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":"AAIA,qBAAa,GAAG;IACd,OAAO,CAAC,YAAY,CAAS;gBACjB,YAAY,EAAE,MAAM;IAI1B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAgBtE;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,MAE5D,CAAC"}
|
|
@@ -3,10 +3,30 @@
|
|
|
3
3
|
* based on configuration
|
|
4
4
|
*
|
|
5
5
|
* https://developers.themoviedb.org/3/getting-started/images
|
|
6
|
-
* @param {string} baseUrl base image url
|
|
7
|
-
* @param {string} fileSize file size
|
|
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
8
|
* @param {string} imagePath raw image path
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {string} format override image format (e.g., 'svg', 'png', 'jpg')
|
|
10
|
+
* @returns {string} The complete image URL
|
|
10
11
|
*/
|
|
11
|
-
export declare const getFullImagePath: (baseUrl: string, fileSize: string, imagePath: string,
|
|
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
|
+
};
|
|
12
32
|
//# sourceMappingURL=getimagePath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getimagePath.d.ts","sourceRoot":"","sources":["../../src/utils/getimagePath.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"getimagePath.d.ts","sourceRoot":"","sources":["../../src/utils/getimagePath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,SAAS,MAAM,KAAG,MAexG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;CAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;;CAIxB,CAAC"}
|
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFullImagePath = void 0;
|
|
3
|
+
exports.ImageFormats = exports.ImageSizes = exports.getFullImagePath = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Utility method to construct full url for image
|
|
6
6
|
* based on configuration
|
|
7
7
|
*
|
|
8
8
|
* https://developers.themoviedb.org/3/getting-started/images
|
|
9
|
-
* @param {string} baseUrl base image url
|
|
10
|
-
* @param {string} fileSize file size
|
|
9
|
+
* @param {string} baseUrl base image url (e.g., 'https://image.tmdb.org/t/p/')
|
|
10
|
+
* @param {string} fileSize file size (e.g., 'original', 'w500')
|
|
11
11
|
* @param {string} imagePath raw image path
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {string} format override image format (e.g., 'svg', 'png', 'jpg')
|
|
13
|
+
* @returns {string} The complete image URL
|
|
13
14
|
*/
|
|
14
|
-
const getFullImagePath = (baseUrl, fileSize, imagePath,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const getFullImagePath = (baseUrl, fileSize, imagePath, format) => {
|
|
16
|
+
if (!imagePath)
|
|
17
|
+
return '';
|
|
18
|
+
// Handle case where imagePath doesn't have an extension
|
|
19
|
+
const hasExtension = imagePath.includes('.');
|
|
20
|
+
if (hasExtension) {
|
|
21
|
+
const imagePathArr = imagePath.split('.');
|
|
22
|
+
const imageFormat = format || imagePathArr[1];
|
|
23
|
+
return `${baseUrl}${fileSize}${imagePathArr[0]}.${imageFormat}`;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// If no extension in path, use provided format or default to jpg
|
|
27
|
+
const imageFormat = format || 'jpg';
|
|
28
|
+
return `${baseUrl}${fileSize}${imagePath}.${imageFormat}`;
|
|
29
|
+
}
|
|
18
30
|
};
|
|
19
31
|
exports.getFullImagePath = getFullImagePath;
|
|
32
|
+
/**
|
|
33
|
+
* Common image sizes available in TMDB
|
|
34
|
+
*/
|
|
35
|
+
exports.ImageSizes = {
|
|
36
|
+
ORIGINAL: 'original',
|
|
37
|
+
W500: 'w500',
|
|
38
|
+
W300: 'w300',
|
|
39
|
+
W185: 'w185',
|
|
40
|
+
W92: 'w92',
|
|
41
|
+
H632: 'h632'
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Image formats supported by TMDB
|
|
45
|
+
*/
|
|
46
|
+
exports.ImageFormats = {
|
|
47
|
+
JPG: 'jpg',
|
|
48
|
+
PNG: 'png',
|
|
49
|
+
SVG: 'svg'
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdanks2000/tmdb-wrapper",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A powerful and easy-to-use TypeScript wrapper for The Movie Database (TMDb) API",
|
|
3
5
|
"module": "./src/index.ts",
|
|
4
6
|
"type": "module",
|
|
5
7
|
"main": "dist/index.js",
|
|
@@ -9,8 +11,16 @@
|
|
|
9
11
|
},
|
|
10
12
|
"repository": {
|
|
11
13
|
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/tdanks2000/tmdb-wrapper"
|
|
14
|
+
"url": "git+https://github.com/tdanks2000/tmdb-wrapper.git"
|
|
13
15
|
},
|
|
16
|
+
"homepage": "https://github.com/tdanks2000/tmdb-wrapper#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/tdanks2000/tmdb-wrapper/issues"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/**/*",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
14
24
|
"keywords": [
|
|
15
25
|
"tmdb",
|
|
16
26
|
"tmdbWrapper",
|
|
@@ -18,7 +28,14 @@
|
|
|
18
28
|
"tmdb-wrapper",
|
|
19
29
|
"api wrapper",
|
|
20
30
|
"node",
|
|
21
|
-
"typescript"
|
|
31
|
+
"typescript",
|
|
32
|
+
"movies",
|
|
33
|
+
"tv shows",
|
|
34
|
+
"movie database",
|
|
35
|
+
"themoviedb",
|
|
36
|
+
"tmdb api",
|
|
37
|
+
"entertainment",
|
|
38
|
+
"media"
|
|
22
39
|
],
|
|
23
40
|
"engines": {
|
|
24
41
|
"node": ">=16"
|
|
@@ -27,15 +44,16 @@
|
|
|
27
44
|
"license": "MIT",
|
|
28
45
|
"private": false,
|
|
29
46
|
"scripts": {
|
|
30
|
-
"build": "
|
|
31
|
-
"release": "
|
|
32
|
-
"
|
|
47
|
+
"build": "tsc && tsc-alias",
|
|
48
|
+
"release": "npm run build && npm version patch && npm publish",
|
|
49
|
+
"release:minor": "npm run build && npm version minor && npm publish",
|
|
50
|
+
"release:major": "npm run build && npm version major && npm publish",
|
|
51
|
+
"preversion": "npm run build"
|
|
33
52
|
},
|
|
34
53
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^
|
|
54
|
+
"@types/node": "^22.15.3",
|
|
36
55
|
"ts-node": "^10.9.2",
|
|
37
|
-
"tsc-alias": "^1.8.
|
|
38
|
-
"typescript": "^5.
|
|
39
|
-
}
|
|
40
|
-
"version": "1.0.2"
|
|
56
|
+
"tsc-alias": "^1.8.15",
|
|
57
|
+
"typescript": "^5.8.3"
|
|
58
|
+
}
|
|
41
59
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface Gravatar {
|
|
2
|
-
hash: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export interface Avatar {
|
|
6
|
-
gravatar: Gravatar;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface AccountDetails {
|
|
10
|
-
avatar: Avatar;
|
|
11
|
-
id: number;
|
|
12
|
-
include_adult: boolean;
|
|
13
|
-
iso_3166_1: string;
|
|
14
|
-
iso_639_1: string;
|
|
15
|
-
name: string;
|
|
16
|
-
username: string;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface Certification {
|
|
2
|
-
certification: string;
|
|
3
|
-
meaning: string;
|
|
4
|
-
order: number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface Certifications {
|
|
8
|
-
certifications: {
|
|
9
|
-
US: Certification[];
|
|
10
|
-
CA: Certification[];
|
|
11
|
-
DE: Certification[];
|
|
12
|
-
GB: Certification[];
|
|
13
|
-
AU: Certification[];
|
|
14
|
-
BR: Certification[];
|
|
15
|
-
FR: Certification[];
|
|
16
|
-
NZ: Certification[];
|
|
17
|
-
IN: Certification[];
|
|
18
|
-
};
|
|
19
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface MediaChange {
|
|
2
|
-
id: number;
|
|
3
|
-
adult: boolean | undefined;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface MediaChanges {
|
|
7
|
-
results: MediaChange[];
|
|
8
|
-
page: number;
|
|
9
|
-
total_pages: number;
|
|
10
|
-
total_results: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface Changes<T> {
|
|
14
|
-
changes: Change<T>[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface Change<T> {
|
|
18
|
-
key: string;
|
|
19
|
-
items: ChangeItem<T>[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ChangeItem<T> {
|
|
23
|
-
id: string;
|
|
24
|
-
action: string;
|
|
25
|
-
time: string;
|
|
26
|
-
value: T;
|
|
27
|
-
iso_639_1: string;
|
|
28
|
-
original_value: T;
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { LanguageOption, Movie } from '..';
|
|
2
|
-
|
|
3
|
-
export interface Collection {
|
|
4
|
-
id: number;
|
|
5
|
-
backdrop_path: string;
|
|
6
|
-
name: string;
|
|
7
|
-
poster_path: string;
|
|
8
|
-
adult: boolean;
|
|
9
|
-
original_language: string;
|
|
10
|
-
original_name: string;
|
|
11
|
-
overview: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface DetailedCollection extends Collection {
|
|
15
|
-
parts: Movie[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface CollectionImageOptions extends LanguageOption {
|
|
19
|
-
/**
|
|
20
|
-
* a list of ISO-639-1 values to query
|
|
21
|
-
*/
|
|
22
|
-
include_image_language?: string[];
|
|
23
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Image } from '..';
|
|
2
|
-
|
|
3
|
-
export interface CompanyDetails {
|
|
4
|
-
description: string;
|
|
5
|
-
headquarters: string;
|
|
6
|
-
homepage: string;
|
|
7
|
-
id: number;
|
|
8
|
-
logo_path: string;
|
|
9
|
-
name: string;
|
|
10
|
-
origin_country: string;
|
|
11
|
-
parent_company: ParentCompany;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ParentCompany {
|
|
15
|
-
name: string;
|
|
16
|
-
id: number;
|
|
17
|
-
logo_path: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface AlternativeNames {
|
|
21
|
-
id: number;
|
|
22
|
-
results: Name[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface Name {
|
|
26
|
-
name: string;
|
|
27
|
-
type: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface CompanyImages {
|
|
31
|
-
id: number;
|
|
32
|
-
logos: Image[];
|
|
33
|
-
}
|