Find the highest-rated TV series in a genre using a paginated REST API.
Unlock detailed company stats for this questionUpgrade
Use HTTP GET on https://jsonmock.hackerrank.com/api//tvseries to find all shows in a given genre. Results are paginated; add ?page={num} to the URL to access more pages. The response is a JSON object with page, per_page, total, total_pages and data (an array of TV series records with name, runtime_of_series, certificate, runtime_of_episodes, genre, imdb_rating, overview, no_of_votes, id). Write bestInGenre(String genre) that returns the name of the show with the highest IMDb rating in that genre; on a tie, return the alphabetically lower name.
Community answers
No answers contributed by the community yet.
Related questions
Find the top-rated movie in a genre from a paginated API.Related courses

Course

Course
Course
