Axuda de The Movie Database

Hello everyone I have a question regarding some functionality that I want to add to my iOS app. I am mostly a frontend guy and therefore any help would be appreciated.

Right now, I have a textbox where I can enter a name of a movie, or an actor, etc. and it will display a table view list with all the matches.

I am doing that by accessing directly the TMDB API search.

That works fine, however, it takes a few seconds to complete which makes total sense.

I want to be able to have some autocomplete on my text field when I start typing in it. I know that this is not possible since it needs a few seconds each time to get any results. Do you guys know if there is a way of doing that? Can I somehow get ALL the movies from the TMDB database? Is this data going to be TOO much to store it locally?

Thanks

Dimitris

6 respostas (na páxina 1 de 1)

Jump to last post

Hi Dimitris,

Our search methods support autocomplete already, you'll notice if you fire off partial search requests you get matches. In fact, the website search here on TMDb is just making straight API requests.

It should be very performant but you will always have the network latency to worry about depending on where you're located. For me it's pretty fast (I'm in Canada, the API is ran on servers in the U.S.), you can see it in action here. That is literally our autocomplete search here on the website making /search/multi requests.

You'll notice the first request is a little longer (300ms) because it's spending time connecting and doing all the SSL handshake stuff. Since we support keep alive though, every request after that is super fast (~75ms).

So, with regards to speed this will have the most to do with network latency than anything else. Depending on where you're located, if you want to shorten the network latency, you would have to store and cache the data locally on a server closer to you. Caching the data is fine, but yes, that's what you would have to do.

Thank you for quick response.

I am kind of confused about some details. first of all, what do you mean you support autocomplete? do you mean that speedwise you can support it?

Also, I am in the US and I have noticed that it takes around 10 sec to get the movies. I think this is too long and I am pretty sure that it doesnt have to do anything with the app itself.

I am also requesting the images which I guess might take more time. This is the url for search "https://api.themoviedb.org/3/search/movie?api_key=" where i input the query with the name of the movie after the key.

I cant understand what might be taking so long.

Is there any example or something? Sorry for all these questions

Hi,

Travis would you please put some example ? :)

https://api.themoviedb.org/3/search/multi?api_key=####&language=en-US&query=avatar&page=1&include_adult=false

@zabkas said:

https://api.themoviedb.org/3/search/multi?api_key=####&language=en-US&query=avatar&page=1&include_adult=false

Does this method work for auto-suggesting URL when adding it to Vivaldi? I have generated an API key and tried it but that did not work.

My suggest URL was: https://api.themoviedb.org/3/search/multi?api_key={redacted}&language=en-US&query=avatar&page=1&include_adult=false

https://imgur.com/iBlaUgU

@swkazashi@outlook.com Can you create a new thread please? I don't know the answer to your question but this thread has nothing to do with Vivaldi.

Thanks!

Non podes atopar unha película ou serie? Inicia sesión para creala.

Global

s amosar a barra de procura
p abrir menú do perfil
esc pechar e abrir xanela
? abrir xanela de atallos do teclado

En páxinas de medios

b atrás (ou á principal se aplica)
e ir a editar páxina

En páxinas de tempadas de televisión

(flecha dereita) ir á tempada seguinte
(flecha esquerda) ir á tempada anterior

En páxinas de episodios de televisión

(flecha dereita) ir ao episodio seguinte
(flecha esquerda) ir ao episodio anterior

En todas as páxinas de imaxe

a abrir a xanela de engadir imaxe

En todas as páxinas de edición

t abrir selector de traducións
ctrl+ s enviar formulario

Nas páxinas de debate

n crear un novo debate
w amosar o estado do seguimento
p mudar público/privado
c mudar abrir/pechar
a abrir actividade
r responder no debate
l ir á última resposta
ctrl+ enter eviar a túa mensaxe
(flecha dereita) páxina seguinte
(flecha esquerda) ir á páxina anterior

Configuración

Queres valorar ou engadir o elemento a unha listaxe?

Iniciar sesión