The Movie Database Support

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 replies (on page 1 of 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 :)

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Увайсці