grantholle / moviedb-promise

Interact with themoviedb.org's api with Node... now in TypeScript!
Other
219 stars 49 forks source link

ShowResponse - next_episode_to_air? #84

Closed joeynotjoe closed 7 months ago

joeynotjoe commented 7 months ago

I noticed that the ShowResponse interface includes this: next_episode_to_air?: null;

Shouldn't this be next_episode_to_air?: SimpleEpisode; , the same as this: last_episode_to_air?: SimpleEpisode;?

Here's a snippet from the response from TMDB:

"last_episode_to_air": {
    "id": 3587355,
    "name": "Coming Home",
    "overview": "The DMA approaches Earth and Ni’Var. With evacuations underway, Burnham and the team aboard the U.S.S. Discovery must find a way to communicate and connect with a species far different from their own before time runs out.",
    "vote_average": 6.4,
    "vote_count": 14,
    "air_date": "2022-03-17",
    "episode_number": 13,
    "episode_type": "finale",
    "production_code": "",
    "runtime": 60,
    "season_number": 4,
    "show_id": 67198,
    "still_path": "/8aqDSsMHFPReRhzwTcFmXBGQ2A2.jpg"
  },
  "name": "Star Trek: Discovery",
  "next_episode_to_air": {
    "id": 4596046,
    "name": "Red Directive",
    "overview": "Captain Burnham and the U.S.S. Discovery are sent to retrieve a mysterious 800-year-old Romulan vessel; until the artifact hidden inside is stolen, leading to an epic chase. Meanwhile, Saru is offered the position of a lifetime, and Tilly's efforts to help pull her into a tangled web of secrecy.",
    "vote_average": 6,
    "vote_count": 2,
    "air_date": "2024-04-04",
    "episode_number": 1,
    "episode_type": "standard",
    "production_code": "",
    "runtime": 60,
    "season_number": 5,
    "show_id": 67198,
    "still_path": "/z7kLGr1712Dn2R0upkwom8uwOiI.jpg"
  },
grantholle commented 7 months ago

Fixed in 4.0.4. Thanks for letting me know!