initial commit

This commit is contained in:
Blake Joynes
2021-05-15 00:22:10 -04:00
commit d800f56ee6
20 changed files with 697 additions and 0 deletions

41
src/tmdb.ts Normal file
View File

@@ -0,0 +1,41 @@
import { Account } from "./endpoints/account";
import {config} from "./config";
import fetch from "node-fetch";
import {Certification} from "./endpoints/certification";
import {Change} from "./endpoints/changes";
export class TMDB {
private accessToken: string;
constructor(accessToken: string){
this.accessToken = accessToken;
}
get account(){
return new Account(this.accessToken);
}
get certifications(){
return new Certification(this.accessToken);
}
get changes(){
return new Change(this.accessToken);
}
}
const tmdb = new TMDB(config.accessToken!);
(async () => {
const changes = await tmdb.changes.movies()
console.log(changes);
})()