This week’s problem set requires a refactoring of last week’s problem. The goal is create the first ‘class’ based on the returned values from
getActor(). There are two goals for this exercise:
- create an
Actor(id, name, poster_path)constructor to allow for a
new Actorto be made using the values returned from your API call;
- add a
getCredits()method to the
Actorconstructor. This method will use
this.idto send a request to the combined credits API endpoint.
Use this new Actor class to build the page with the actor’s details and their tv show and movie credits.