Suporte do 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ágina 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!

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade