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 antwoorde (op blad 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 :)

Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.

Globaal

s fokus op soekbalk
p open profielkieslys
esc sluit ’n oop venster
? open sneltoetsvenster

Op mediablaaie

b gaan terug (na ouer waar van toepassing)
e gaan na wysigblad

Op TV-seisoenblaaie

(regterpyl) gaan na volgende seisoen
(linkerpyl) gaan na vorige seisoen

Op TV-episodeblaaie

(regterpyl) gaan na volgende episode
(linkerpyl) gaan na vorige episode

Op alle beeldblaaie

a open beeldtoevoegvenster

Op alle wysigingsblaaie

t open vertaalkieser
ctrl+ s dien form in

Op besprekingsblaaie

n skep nuwe bespreking
w tokkel kykstatus
p tokkel openbaar/privaat
c tokkel maak oop/toe
a open aktiwiteit
r reageer op bespreking
l gaan na laaste reaksie
ctrl+ enter dien u boodskap in
(regterpyl) volgende blad
(linkerpyl) vorige blad

Instellings

Wil u hierdie item gradeer of tot ’n lys toevoeg?

Teken aan