I'm trying to get data from page 2 and so on, but I keep getting page 1 data in my app. If I place the url link in chrome the response is correct, but in the app it reverts back to page 1. This is how the call looks like:
https://api.themoviedb.org/3/movie/popular?api_key=###&include_adult=false&page=29&watch_region=NL&vote_average.ite=1
Не можеш да нађеш филм или серију? Пријави се да додаш.
Желите ли да оцените или додате ову ставку у листу?
Нисте члан?
Одговор од robbie3999
дана 20. јул 2023. у 10:21 AM
Hi @Majinnn, you have several problems.
First, you need to edit your post immediately and replace the api_key value with something like THE_KEY or xxxxx. Never share your api_key in public.
Second, that query doesn't support most of the parameters you are passing it. See the documentation here.
Perhaps you meant to use the discover query. Even in that query there is no vote_average.ite. You would want vote_average.lte/gte.
Lastly, a general troubleshooting tip, if you get different results in your browser and in your app, try putting a print statement in your app where you retrieve the url to make sure it is what you think it is.
Одговор од Majinnn
дана 21. јул 2023. у 6:21 AM
Even after changing all what you said, I still only get results from page 1.
I have prints everywhere, that's why I know that the response keeps giving me page 1 results.
Одговор од ticao2 🇧🇷 pt-BR
дана 21. јул 2023. у 7:49 AM
I'm not a code programmer. Just a curious old man.
I will highlight in the title the tool you are using.
I believe that your chances of getting help from other users here on the forum will increase a lot.
Something like
Swift UI iOS - Results past page 1
Одговор од robbie3999
дана 21. јул 2023. у 1:17 PM
@Majinnn, to be clear I was suggesting you print out the url you are sending, not the results you get back. It seems likely that you are sending a malformed url where the page number is undefined for whatever reason. Note that in the query the page number is -optional-, and if it can't determine a page number the default is page 1.
Одговор од Majinnn
дана 23. јул 2023. у 8:52 AM
I also have a print for the url. The print show's that the url is sent correctly, but for some reason it reverts back to page 1