I recently noticed the new API documentation (looks very nice, btw) and observed that a lot of fields previously marked "some-type or null" in the old documentation no longer have the "or null" specified. However, API requests still supply null values where the new documentation does not specify that they will be there. I suspect there is some statement about nulls that I may have missed. Can someone provide a link, reference or statement that I can use as a guide in my app on where TMDB might supply null values unexpectedly or how I can know when to expect null values. That would be much appreciated.
找不到电影或剧集?登录并创建它吧。
pajatopmr 的回复
于 2023 年 07 月 06 日 7:42上午
After doing some searching, I now believe the current documentation is the old documentation with a new face that does not indicate where nulls are relevant. Love to hear that I'm wrong.
Visne 的回复
于 2024 年 02 月 09 日 9:27下午
I think you are correct, and this is quite sad.
rednaz 的回复
于 2024 年 06 月 24 日 6:44上午
I've stumbled across this recently when trying to get some robustness around the API. It's hard to write defensive code when you aren't sure what can be null. Surely the only option isn't to just assume everything can be null?
Travis Bell 的回复
于 2024 年 06 月 25 日 2:08下午
Our hands are unfortunately tied until ReadMe (our docs provider) adds supports this. At this time, I am not able to change it because it's not supported.