I am looking to retrieve movie data from the omdbapi.
Currently, I am experimenting with incorporating typescript to precisely define the data fetched from the endpoint (I am still learning typescript).
When examining the structure of the retrieved data, I ponder if it is truly necessary to individually list all the data in the interface if it is a string?
interface Movie {
Title: string;
Year: string;
Rated: string;
Released: string;
Runtime: string;
Genre: string;
Director: string;
Writer: string;
Actors: string;
Plot: string;
Language: string;
Country: string;
Awards: string;
Poster: string;
Ratings: [
{
Source: string;
Value: string;
},
{
Source: string;
Value: string;
},
{
Source: string;
Value: string;
}
];
Metascore: string;
imdbRating: string;
imdbVotes: string;
imdbID: string;
Type: string;
DVD: string;
BoxOffice: string;
Production: string;
Website: string;
Response: string;
}