Hi! I'm writing a method that fetches the poster for a movie based on the movie's ID (such as 505.
My only question is, how do I get this ID?
In this scenario, the user would enter a title or pick a title from a list (such as The Hobbit: The Desolation of Smaug (2013))
What I need is an API or way of getting an ID from that title that I can use to get the poster.
I already have the method and API call for getting the poster written. All I need is a way to translate that title into an ID.
Thanks in advance!
Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.
Wil u hierdie item gradeer of tot ’n lys toevoeg?
Nie ’n lid nie?
Antwoord deur Travis Bell
op 18 Januarie 2014 om 1:55 NM
Hi sammydogbro,
You would want to look at the search method. Knowing the title of say, "The Hobbit: The Desolation of Smaug" you can search like so:
You can be more precise if you know the year:
You can then grab the results from the results array and parse out the ID.
Cheers.