Question: Can someone help with these functions using API and python! Website : https://www.themoviedb.org/ API KEY: 8bb45882c0894d8c1ad25a8dcc157c09 Function name: get_cast_members Parameters: movie_id (int), job_title (string), section
Can someone help with these functions using API and python!
Website : https://www.themoviedb.org/
API KEY: 8bb45882c0894d8c1ad25a8dcc157c09



Function name: get_cast_members Parameters: movie_id (int), job_title (string), section (string) Returns: names of people who worked the job specified by the job title for the given movie (list of strings) Description: Write a function that takes in a movie id, a job_title, and a section (either "cast" or "crew"). Find the names of every person working on the movie who works in the specified section and has the specified job title. Assume everything passed in is valid. Add these names to a list. Return the list at the end of the function Note: Every job title listed as "Actor" will be considered as working for the section "cast" and every person working for the section "cast" will be considered under the job title "Actor". The only job_title that works in the "cas" section is "Actor". All other job types will be found under the "crew" section Hint: The credits endpoint will be useful for solving this function. Test Cases; >>> test-1 get-cast-members (1493, "Actor", "cast") >>>print(test 1) I 'Sandra Bullock', "Benjamin Bratt', 'Michael Caine', "Candice Bergen', 'William Shatner', 'Ernie Hudson', "John DiResta Heather Burns', 'Melissa De Sousa', "Steve Monroe', "Deirdre Quinn', 'Wendy Raquel Robinson', Asia De Marcos 'Ken Thomas', "Gabriel Folse, 'Leeanne Locken', John Cann'] "Director", "crew") >>> test2= get-cast-members (157336, >>> print (test-2) [ 'Christopher Nolan' ] "Writer", "crew") >>> test. 3 = get-cast-members (315635, >>>print (test 3 Function name: get_cast_members Parameters: movie_id (int), job_title (string), section (string) Returns: names of people who worked the job specified by the job title for the given movie (list of strings) Description: Write a function that takes in a movie id, a job_title, and a section (either "cast" or "crew"). Find the names of every person working on the movie who works in the specified section and has the specified job title. Assume everything passed in is valid. Add these names to a list. Return the list at the end of the function Note: Every job title listed as "Actor" will be considered as working for the section "cast" and every person working for the section "cast" will be considered under the job title "Actor". The only job_title that works in the "cas" section is "Actor". All other job types will be found under the "crew" section Hint: The credits endpoint will be useful for solving this function. Test Cases; >>> test-1 get-cast-members (1493, "Actor", "cast") >>>print(test 1) I 'Sandra Bullock', "Benjamin Bratt', 'Michael Caine', "Candice Bergen', 'William Shatner', 'Ernie Hudson', "John DiResta Heather Burns', 'Melissa De Sousa', "Steve Monroe', "Deirdre Quinn', 'Wendy Raquel Robinson', Asia De Marcos 'Ken Thomas', "Gabriel Folse, 'Leeanne Locken', John Cann'] "Director", "crew") >>> test2= get-cast-members (157336, >>> print (test-2) [ 'Christopher Nolan' ] "Writer", "crew") >>> test. 3 = get-cast-members (315635, >>>print (test 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
