[Tutor] Python OO

Juan C. juan0christian at gmail.com
Mon Mar 30 03:57:15 CEST 2015


On Sun, Mar 29, 2015 at 9:39 PM Juan C. <juan0christian at gmail.com> wrote:
The ID is set by the API, I don't have control over it, I can't modify it,
and I don't really need to modify it. There is an option to search the API
using the name, like so (
http://private-anon-37abaab74-themoviedb.apiary-mock.com/3/search/person?query=Will%20Smith
).

Of course in the "user side" of the things I will ask for names, let's say.
The person wants to know all the movies that Will Smith played in. Of
course I won't ask the user for his ID (that is 287) because they wouldn't
know, the user will simply type his name.

And my code will call this part of the API to get the ID of the person, and
then create a new Actor using 'actor = Actor(287)'.

The same goes for Movie and Series related stuff, I just modify the
"/person?" to "/movie?" or "/tv?".


Oh, and yes, my bad, indeed, the user will provide the name only, my script
will get the ID.


More information about the Tutor mailing list