blakejoy / tmdb-ts

Typescript client wrapper for TheMovieDB (TMDB) v3
MIT License
39 stars 12 forks source link

Add watch endpoint #4

Closed joelhenryclark123 closed 1 year ago

joelhenryclark123 commented 1 year ago

Watch Providers endpoint!

I added support for the watch providers endpoints. The endpoints return the full list of supported region codes & the full list of watch providers.

Additions

Benefit

Lets you store the watch providers in your own database

Test it out

const tmdb = new TMDB(<api key>);

// List the names of all the movie providers in the US
tmdb.watchProviders.getMovieProviders().then(response => {
  response.results.forEach(provider => {
    console.log(provider.provider_name);
  });
});

// Get regions in english
tmdb.watchProviders.getRegions().then(console.log);

// Get regions in german
tmdb.watchProviders.getRegions('de').then(console.log);
Hoidi commented 1 year ago

@joelhenryclark123 Any plans to finnish this?