@tdanks2000/tmdb-wrapper 1.0.3 → 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.
Files changed (74) hide show
  1. package/README.md +334 -148
  2. package/dist/endpoints/collections.js +1 -1
  3. package/dist/endpoints/index.d.ts +3 -0
  4. package/dist/endpoints/index.d.ts.map +1 -1
  5. package/dist/endpoints/index.js +3 -0
  6. package/dist/endpoints/movies.js +1 -1
  7. package/dist/endpoints/tvEpisodes.js +2 -2
  8. package/dist/endpoints/tvSeasons.js +2 -2
  9. package/dist/endpoints/tvShows.js +2 -2
  10. package/dist/endpoints/watchProviders.d.ts +33 -0
  11. package/dist/endpoints/watchProviders.d.ts.map +1 -0
  12. package/dist/endpoints/watchProviders.js +63 -0
  13. package/dist/index.d.ts +4 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +3 -0
  16. package/dist/utils/api.d.ts.map +1 -1
  17. package/dist/utils/getimagePath.d.ts +24 -4
  18. package/dist/utils/getimagePath.d.ts.map +1 -1
  19. package/dist/utils/getimagePath.js +39 -8
  20. package/package.json +59 -41
  21. package/.github/workflows/npm-publish.yml +0 -33
  22. package/src/@types/endpoints/account.ts +0 -17
  23. package/src/@types/endpoints/certification.ts +0 -19
  24. package/src/@types/endpoints/changes.ts +0 -29
  25. package/src/@types/endpoints/collection.ts +0 -23
  26. package/src/@types/endpoints/companies.ts +0 -33
  27. package/src/@types/endpoints/configuration.ts +0 -112
  28. package/src/@types/endpoints/credits.ts +0 -149
  29. package/src/@types/endpoints/discover.ts +0 -87
  30. package/src/@types/endpoints/find.ts +0 -28
  31. package/src/@types/endpoints/genre.ts +0 -3
  32. package/src/@types/endpoints/index.ts +0 -22
  33. package/src/@types/endpoints/keywords.ts +0 -24
  34. package/src/@types/endpoints/movies.ts +0 -169
  35. package/src/@types/endpoints/networks.ts +0 -15
  36. package/src/@types/endpoints/options.ts +0 -189
  37. package/src/@types/endpoints/people.ts +0 -151
  38. package/src/@types/endpoints/review.ts +0 -8
  39. package/src/@types/endpoints/search.ts +0 -39
  40. package/src/@types/endpoints/trending.ts +0 -20
  41. package/src/@types/endpoints/tvEpisode.ts +0 -72
  42. package/src/@types/endpoints/tvSeasons.ts +0 -37
  43. package/src/@types/endpoints/tvShows.ts +0 -284
  44. package/src/@types/endpoints/watchProviders.ts +0 -298
  45. package/src/@types/index.ts +0 -3
  46. package/src/@types/models/baseEndpoint.ts +0 -9
  47. package/src/@types/models/index.ts +0 -1
  48. package/src/@types/types.ts +0 -199
  49. package/src/endpoints/account.ts +0 -22
  50. package/src/endpoints/certification.ts +0 -30
  51. package/src/endpoints/changes.ts +0 -41
  52. package/src/endpoints/collections.ts +0 -57
  53. package/src/endpoints/companies.ts +0 -41
  54. package/src/endpoints/configuration.ts +0 -22
  55. package/src/endpoints/credits.ts +0 -23
  56. package/src/endpoints/discover.ts +0 -40
  57. package/src/endpoints/find.ts +0 -24
  58. package/src/endpoints/genre.ts +0 -32
  59. package/src/endpoints/index.ts +0 -18
  60. package/src/endpoints/keywords.ts +0 -35
  61. package/src/endpoints/movies.ts +0 -244
  62. package/src/endpoints/networks.ts +0 -41
  63. package/src/endpoints/people.ts +0 -147
  64. package/src/endpoints/review.ts +0 -23
  65. package/src/endpoints/search.ts +0 -93
  66. package/src/endpoints/trending.ts +0 -30
  67. package/src/endpoints/tvEpisodes.ts +0 -125
  68. package/src/endpoints/tvSeasons.ts +0 -138
  69. package/src/endpoints/tvShows.ts +0 -286
  70. package/src/index.ts +0 -66
  71. package/src/utils/api.ts +0 -31
  72. package/src/utils/getimagePath.ts +0 -16
  73. package/src/utils/index.ts +0 -2
  74. package/tsconfig.json +0 -101
@@ -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';
@@ -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,EAChB,MAAM,aAAa,CAAC;AAErB,cAAM,IAAI;gBACI,YAAY,EAAE,MAAM;IAqBhC,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE,qBAAqB,CAAC;IACrC,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,mBAAmB,CAAC;IACjC,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,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;CAC1B;AAED,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,CAAC"}
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;
@@ -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,aAAc,OAAO,MAAM,EAAE,GAAG,CAAC,KAAG,MAE5D,CAAC"}
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 {boolean} svg get svg version if true
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, svg?: boolean) => 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;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,YAAa,MAAM,YAAY,MAAM,aAAa,MAAM,oBAAgB,MAKpG,CAAC"}
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 {boolean} svg get svg version if true
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, svg = false) => {
15
- const imagePathArr = imagePath.split('.');
16
- const imageFormat = svg ? 'svg' : imagePathArr[1];
17
- return `${baseUrl}${fileSize}${imagePathArr[0]}.${imageFormat}`;
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,41 +1,59 @@
1
- {
2
- "name": "@tdanks2000/tmdb-wrapper",
3
- "version": "1.0.3",
4
- "module": "./src/index.ts",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "publishConfig": {
9
- "access": "public"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/tdanks2000/tmdb-wrapper"
14
- },
15
- "keywords": [
16
- "tmdb",
17
- "tmdbWrapper",
18
- "tmdb wrapper",
19
- "tmdb-wrapper",
20
- "api wrapper",
21
- "node",
22
- "typescript"
23
- ],
24
- "engines": {
25
- "node": ">=16"
26
- },
27
- "author": "TDanks2000",
28
- "license": "MIT",
29
- "private": false,
30
- "scripts": {
31
- "build": "pnpm tsc && pnpm tsc-alias",
32
- "release": "yarn version && npm publish",
33
- "preversion": "pnpm run build"
34
- },
35
- "devDependencies": {
36
- "@types/node": "^20.11.20",
37
- "ts-node": "^10.9.2",
38
- "tsc-alias": "^1.8.8",
39
- "typescript": "^5.3.3"
40
- }
41
- }
1
+ {
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",
5
+ "module": "./src/index.ts",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/tdanks2000/tmdb-wrapper.git"
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
+ ],
24
+ "keywords": [
25
+ "tmdb",
26
+ "tmdbWrapper",
27
+ "tmdb wrapper",
28
+ "tmdb-wrapper",
29
+ "api wrapper",
30
+ "node",
31
+ "typescript",
32
+ "movies",
33
+ "tv shows",
34
+ "movie database",
35
+ "themoviedb",
36
+ "tmdb api",
37
+ "entertainment",
38
+ "media"
39
+ ],
40
+ "engines": {
41
+ "node": ">=16"
42
+ },
43
+ "author": "TDanks2000",
44
+ "license": "MIT",
45
+ "private": false,
46
+ "scripts": {
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"
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^22.15.3",
55
+ "ts-node": "^10.9.2",
56
+ "tsc-alias": "^1.8.15",
57
+ "typescript": "^5.8.3"
58
+ }
59
+ }
@@ -1,33 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Node.js Package
5
-
6
- on:
7
- release:
8
- types: [created]
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 16
18
- - run: npm ci
19
- - run: npm test
20
-
21
- publish-npm:
22
- needs: build
23
- runs-on: ubuntu-latest
24
- steps:
25
- - uses: actions/checkout@v3
26
- - uses: actions/setup-node@v3
27
- with:
28
- node-version: 16
29
- registry-url: https://registry.npmjs.org/
30
- - run: npm ci
31
- - run: npm publish
32
- env:
33
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -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
- }
@@ -1,112 +0,0 @@
1
- export interface ImageConfiguration {
2
- base_url: string;
3
- secure_base_url: string;
4
- backdrop_sizes: BackdropSizes[];
5
- logo_sizes: LogoSizes[];
6
- poster_sizes: PosterSizes[];
7
- profile_sizes: ProfileSizes[];
8
- still_sizes: StillSizes[];
9
- }
10
-
11
- export interface Configuration {
12
- images: ImageConfiguration;
13
- change_keys: ChangeKeys[];
14
- }
15
-
16
- export const enum BackdropSizes {
17
- W300 = 'w300',
18
- W500 = 'w500',
19
- W780 = 'w780',
20
- W1280 = 'w1280',
21
- ORIGINAL = 'original',
22
- }
23
-
24
- export const enum LogoSizes {
25
- W45 = 'w45',
26
- W92 = 'w92',
27
- W154 = 'w154',
28
- W185 = 'w185',
29
- W300 = 'w300',
30
- W500 = 'w500',
31
- ORIGINAL = 'original',
32
- }
33
-
34
- export const enum PosterSizes {
35
- W92 = 'w92',
36
- W154 = 'w154',
37
- W185 = 'w185',
38
- W300 = 'w300',
39
- W500 = 'w500',
40
- W780 = 'w780',
41
- ORIGINAL = 'original',
42
- }
43
-
44
- export const enum ProfileSizes {
45
- W45 = 'w45',
46
- W185 = 'w185',
47
- W632 = 'w632',
48
- ORIGINAL = 'original',
49
- }
50
-
51
- export const enum StillSizes {
52
- W92 = 'w92',
53
- W185 = 'w185',
54
- W300 = 'w300',
55
- ORIGINAL = 'original',
56
- }
57
-
58
- export const enum ChangeKeys {
59
- ADULT = 'adult',
60
- AIR_DATE = 'air_date',
61
- ALSO_KNOWN_AS = 'also_known_as',
62
- ALTERNATIVE_TITLES = 'alternative_titles',
63
- BIOGRAPHY = 'biography',
64
- BIRTHDAY = 'birthday',
65
- BUDGET = 'budget',
66
- CAST = 'cast',
67
- CERTIFICATIONS = 'certifications',
68
- CHARACTER_NAMES = 'character_names',
69
- CREATED_BY = 'created_by',
70
- CREW = 'crew',
71
- DEATHDAY = 'deathday',
72
- EPISODE = 'episode',
73
- EPISODE_NUMBER = 'episode_number',
74
- EPISODE_RUN_TIME = 'episode_run_time',
75
- FREEBASE_ID = 'freebase_id',
76
- FREEBASE_MID = 'freebase_mid',
77
- GENERAL = 'general',
78
- GENRES = 'genres',
79
- GUEST_STARS = 'guest_stars',
80
- HOMEPAGE = 'homepage',
81
- IMAGES = 'images',
82
- IMDB_ID = 'imdb_id',
83
- LANGUAGES = 'languages',
84
- NAME = 'name',
85
- NETWORK = 'network',
86
- ORIGIN_COUNTRY = 'origin_country',
87
- ORIGINAL_NAME = 'original_name',
88
- ORIGINAL_TITLE = 'original_title',
89
- OVERVIEW = 'overview',
90
- PARTS = 'parts',
91
- PLACE_OF_BIRTH = 'place_of_birth',
92
- PLOT_KEYWORDS = 'plot_keywords',
93
- PRODUCTION_CODE = 'production_code',
94
- PRODUCTION_COMPANIES = 'production_companies',
95
- PRODUCTION_COUNTRIES = 'production_countries',
96
- RELEASES = 'releases',
97
- REVENUE = 'revenue',
98
- RUNTIME = 'runtime',
99
- SEASON = 'season',
100
- SEASON_NUMBER = 'season_number',
101
- SEASON_REGULAR = 'season_regular',
102
- SPOKEN_LANGUAGES = 'spoken_languages',
103
- STATUS = 'status',
104
- TAGLINE = 'tagline',
105
- TITLE = 'title',
106
- TRANSLATIONS = 'translations',
107
- TVDB_ID = 'tvdb_id',
108
- TVRAGE_ID = 'tvrage_id',
109
- TYPE = 'type',
110
- VIDEO = 'video',
111
- VIDEOS = 'videos',
112
- }