Compare commits
5 Commits
patch/upda
...
blakejoy-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fed644950 | ||
|
|
e5ce15d58d | ||
|
|
7f98a557dc | ||
|
|
9e54e26e87 | ||
|
|
69a883e845 |
@@ -14,8 +14,10 @@ Installation:
|
||||
npm install --save tmdb-ts
|
||||
``
|
||||
|
||||
Version 1.0 removed the default import so make sure you update accordingly!
|
||||
|
||||
```js
|
||||
import TMDB from 'tmdb-ts';
|
||||
import { TMDB } from 'tmdb-ts';
|
||||
|
||||
const tmdb = new TMDB('accessToken');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tmdb-ts",
|
||||
"version": "0.2.0",
|
||||
"version": "1.0.0",
|
||||
"description": "TMDB v3 library wrapper",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -3,7 +3,7 @@ import { parseOptions } from './utils';
|
||||
|
||||
const BASE_URL_V3 = 'https://api.themoviedb.org/3';
|
||||
|
||||
export default class Api {
|
||||
export class Api {
|
||||
constructor(private accessToken: string) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Api from '../api';
|
||||
import { Api } from '../api';
|
||||
|
||||
export class BaseEndpoint {
|
||||
protected api: Api;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TMDB from './tmdb';
|
||||
import { TMDB } from './tmdb';
|
||||
|
||||
export * from './types';
|
||||
export * from './utils';
|
||||
|
||||
export default TMDB;
|
||||
export { TMDB };
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
CollectionsEndpoint,
|
||||
} from './endpoints';
|
||||
|
||||
export default class TMDB {
|
||||
export class TMDB {
|
||||
private readonly accessToken: string;
|
||||
|
||||
constructor(accessToken: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export function parseOptions(options?: Record<string, any>): string {
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
return options ? new URLSearchParams(Object.entries(options)).toString() : '';
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"types": ["node"],
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
// "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
|
||||
// "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */,
|
||||
"skipLibCheck": true /* Skip type checking of declaration files. */,
|
||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
|
||||
"typeRoots": ["./src/types"]
|
||||
|
||||
Reference in New Issue
Block a user