Giter Site home page Giter Site logo

tmdb-js's People

Contributors

github-actions[bot] avatar jorrinkievit avatar newmoneybigbucks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tmdb-js's Issues

append_to_response is not typesafe

It would be kind of cool if append_to_response would be typesafe. I came out with the "solution" below (a cast), that is not actually a solution because for example, MoviesGetVideosResponse and MoviesGetImagesResponse are types that have id as one of the properties but, when you append videos or images, you don't get the id and also, MoviesGetImagesResponse doesn't have logos property.

api.v3.movies.getDetails(12, {append_to_response: "videos,images"}).then(movie => {
    movie.videos; // <- Property 'videos' does not exist on type 'MoviesGetDetailsResponse'.
    (movie as MoviesGetDetailsResponse & {videos: MoviesGetVideosResponse}).videos

    movie.images; // <- Property 'images' does not exist on type 'MoviesGetDetailsResponse'.
    (movie as MoviesGetDetailsResponse & {images: MoviesGetImagesResponse}).images
})

A solution would at least be to provide an interface specifically for append_to_response responses that you can use to cast, in the case, movie variable.
But at the end it's really a nice api, good job!

Can't fetch trending

Hi, Thank you so much for this package.
I think I'm facing a problem with v3.trending.getTrending() method, I pass the mediaType and timeWindow, but it seems like the timeWindow value is not added to the URL, resulting in a 404.

image
image

Language param is missing

This endpoint

tmdb.v3.trending.getTrending

got "mediaType" and "timeWindow" but language is missing

Append to response is not typed anywhere needed

For example, tv show's getDetails is not append to response typed

getDetails: <T extends TVAppendToResponse[]>(tvId: number, params?: TVGetDetailsParams<T>) => Promise<TVGetDetailsResponse>;

but movie's one is

getDetails: <T extends MoviesAppendToResponse[]>(movieId: number, params?: MoviesGetDetailsParams<T>) => Promise<GetDetailsResponse<T>>;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.