JorrinKievit / tmdb-js

A typesafe API wrapper for the TheMovieDatabase API for Node and the Web
10 stars 1 forks source link

belongs_to_collection is null #9

Closed paolodelfino closed 1 year ago

paolodelfino commented 1 year ago

when I get a movie details

tmdb.v3.movies.getDetails

the property "belongs_to_collection" is null

JorrinKievit commented 1 year ago

Also happens on the API side: https://developer.themoviedb.org/reference/movie-details, so unfortunately that is an issue out of my hands

paolodelfino commented 1 year ago

If you make a call to (for example)

https://api.themoviedb.org/3/movie/829280?api_key={api_key}

you can see

"belongs_to_collection": {
    "id": 829314,
    "name": "Enola Holmes Collection",
    "poster_path": "/9QfsXZTS7gDJwkSmmBPlml3P8ca.jpg",
    "backdrop_path": "/HScQCcEd3yucY3XYRCnkRzl7Gp.jpg"
},

which is not a null value, it could be null but not constrained as reported instead in the typescript declaration file. Here, however there is an issue because in the tmdb developer api belongs_to_collection is indicated to be a string which is actually wrong.

Could you please refer to the object

"belongs_to_collection": {
    "id": 829314,
    "name": "Enola Holmes Collection",
    "poster_path": "/9QfsXZTS7gDJwkSmmBPlml3P8ca.jpg",
    "backdrop_path": "/HScQCcEd3yucY3XYRCnkRzl7Gp.jpg"
},

for your package?

JorrinKievit commented 1 year ago

Aaaahh okay sorry i misunderstood, yep will do that later today after work!