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 :)
找不到电影或节目?登录并创建它吧。
Travis Bell 的回复
于 2014 年 07 月 03 日 9:58上午
Hi konst891,
The URL's to paginate do indeed look like this:
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)?
konst891 的回复
于 2014 年 07 月 03 日 10:17上午
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 :)