Supporto The Movie Database

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!

1 risposta (nella pagina 1 di 1)

Jump to last post

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:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug

You can be more precise if you know the year:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug&year=2013

You can then grab the results from the results array and parse out the ID.

Cheers.

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi