Calling REST API
In this lesson, we cover calling REST API in detail.
In this section, you’ll learn how to access TMDB API to fetch popular movies.
What is an API?
API is an acronym for Application Programming Interface. An API lets two applications talk to each other.
The Movie DB contains information about popular movies and TV shows. API is the way to facilitate the app to fetch information from this big movie data storage into our application.
API key
An API key is a unique identifier given to a user, app, or developer to be able to make API requests. It is used to track the number of requests made by the app.
In the code, we’ll be using a variable apiKey
to store the API key to access TheMovieDB API.
final apiKey = "YOUR_API_KEY";
First, you’ll need to get an API key for yourself. You need this to be able ...