ravenloue / TMDB-TrendingSearch

A mobile-friendly webpage that utilizes TMDB's API to retrieve daily or weekly trends for movies, tv shows and people involved in the industry.
https://ravenloue.github.io/TMDB-TrendingSearch/public/
1 stars 0 forks source link

Determine what type of API call needs to be made to TMDB #18

Closed ravenloue closed 1 year ago

ravenloue commented 1 year ago

Once I have the event listeners set, I need to know which API call needs to be made for that specific item

ravenloue commented 1 year ago

According to the TMDB documentation, each media type has different parameters for the call..

Movies need to have /movie/, People need to have /person/ and TV Shows need to use /tv/.

I should incorporate the media_type from the original call into the id, and then extract the id number only from the attribute.

ravenloue commented 1 year ago

Added the media type to the id name.

Conditional set up to determine which media type is being clicked to verify how to slice the item's database id from the id attribute.