dev2 – Actor class

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 Actor to be made using the values returned from your API call;
  • add a getCredits() method to the Actor constructor. This method will use to 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.

Leave a comment

Your email address will not be published. Required fields are marked *