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
Nie możesz znaleźć filmu lub serialu? Zaloguj się, aby go utworzyć.
Want to rate or add this item to a list?
Not a member?
Odpowiedź użytkownika Travis Bell
8 listopada 2016 o godz. 12:20PM
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.
Odpowiedź użytkownika dtsits
8 listopada 2016 o godz. 12:47PM
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
Odpowiedź użytkownika erdalyenigul
5 lipca 2019 o godz. 4:10PM
Hi,
Travis would you please put some example ? :)
Odpowiedź użytkownika zabkas
21 kwietnia 2020 o godz. 4:32PM
Odpowiedź użytkownika lordlance
2 grudnia 2024 o godz. 9:49AM
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
Odpowiedź użytkownika Travis Bell
2 grudnia 2024 o godz. 11:40AM
@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!