OMDb-API
OMDb-API copied to clipboard
All fields are Strings
All of the fields returned in the response are String
s, including year
, imdbRating
, and Metascore
. This makes sorting more difficult, because they need to be deserialized, and then they also need to be transformed. Nullable fields should also not be String
s with "N/A"
for null
values. Proposed changes:
-
year
->Int
-
Released
(Date) ->Long
-
imdbRating
->Float
-
imdbVotes
->Int
-
Metascore
->Int
-
DVD
(Date) ->Long
-
BoxOffice
->Int
(assuming USD or another specific currency) -
Production
->String?
("N/A"
->null
-
Website
->String?
("N/A"
->null
-
Response
->Boolean
("True"
->true
) -
Rating.Value
->Float
, ie
"Ratings": [
{
"Source": "Internet Movie Database",
"Value": "7.4/10"
},
{
"Source": "Rotten Tomatoes",
"Value": "40%"
},
{
"Source": "Metacritic",
"Value": "33/100"
}
]
->
"Ratings": [
{
"Source": "Internet Movie Database",
"Value": 7.4
},
{
"Source": "Rotten Tomatoes",
"Value": 40.0
},
{
"Source": "Metacritic",
"Value": 33.0
}
]