vkay94 / TMDb-Kotlin

TheMovieDatabase API wrapper for Kotlin
https://vkay94.github.io/TMDb-Kotlin
Apache License 2.0
9 stars 2 forks source link

`note` field should be nullable or have a default value #2

Closed Nevercom closed 3 years ago

Nevercom commented 3 years ago

TMDB API: release_dates Sample Request: https://api.themoviedb.org/3/movie/240/release_dates

{
    "iso_3166_1": "PT",
    "release_dates": [
    {
        "certification": "M/16",
        "iso_639_1": "en",
        "release_date": "1977-10-14T00:00:00.000Z",
        "type": 3
    }
    ]
}

As shown in the example response, note field is not always present in the JSON Object.

https://github.com/vkay94/TMDb-Kotlin/blob/f3c9ad99439f765c5923bfe8674aebd72c05e8e3/src/main/java/de/vkay/api/tmdb/models/TmdbReleaseDate.kt#L11

vkay94 commented 3 years ago

Good catch, thanks :). It seems to be an API bug on their side. Unfortunately, there were many cases like these - at least they can be fixed easily in Kotlin xD