The Movie Database-ondersteuning

Hello!

Trying to make an android app, which would make a request to movie database and then output list of movies in listview, trying to make a request to this link: http://private-88b3-themoviedb.apiary-mock.com/3/movie/popular And sending next parameters:

        List<NameValuePair> params = new ArrayList<NameValuePair>();
        params.add(new BasicNameValuePair("api_key", API_KEY));
        params.add(new BasicNameValuePair("page", "3"));
        JSONObject jsonObject = jsonParser.MakeHTTPRequest(GET_MOVIES_URL, "GET", params);

But i'm getting only first page which is shown in example. And the JSON response looks like this: {"total_pages":6142,"results":[{"id":82992,"title":"Fast & Furious 6" ... etc.

But in your api example it looks like this: { "page": 1, "results": [ { "adult": false, "backdrop_path": "/5bKy4O0WQTa3MG2wPWViUNUTIEG.jpg", "id": 82992, "original_title": "Fast & Furious 6", "release_date": "2013-05-24", "poster_path": "/3Izae8UATwSHizQiEVZEWf53wjM.jpg", "popularity": 56.5133968700669, "title": "Fast & Furious 6", "vote_average": 7.3, "vote_count": 13 }

Maybe i should send optional "page" parameter different way? Please help :)

2 antwoorden (op pagina 1 van 1)

Jump to last post

Hi konst891,

The URL's to paginate do indeed look like this:

https://api.themoviedb.org/3/movie/popular?api_key=###&page=1
https://api.themoviedb.org/3/movie/popular?api_key=###&page=2

Etc.

It could be that you're going through Apiary. What do the responses look like if you hit the production server (api.themoviedb.org)?

Indeed i'm using the URLs which are set in apiary. Okay, i'll give it a try with new urls and tell you about result. Thank you for quick reply :)

Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.

Wereldwijd

s focus op zoekbalk
p open profielmenu
esc sluit een open venster
? open sneltoetsen venster

Op media pagina's

b ga terug (of ga naar bovenliggend item)
e ga naar beweken

Op tv-seizoenspagina's

(rechter pijl) ga naar volgende seizoen
(linker pijl) ga naar vorig seizoen

Op pagina's met tv-series

(rechter pijl) ga naar volgende aflevering
(linker pijl) ga naar vorige aflevering

Op alle afbeeldingspagina's

a open venster afbeelding toevoegen

Op alle bewerkte pagina's

t open vertaalmenu
ctrl+ s verstuur formulier

Op discussiepagina's

n start nieuwe discussie
w Verander kijk status
p privé of openbaar
c schakelen sluiten/openen
a open activiteit
r beantwoord discussie
l ga naar laatste antwoord
ctrl+ enter verstuur uw bericht
(rechter pijl) volgende pagina
(linker pijl) vorige pagina

Instellingen

Want to rate or add this item to a list?

Inloggen