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
در تاریخ ژوئیه 3, 2014 ساعت 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
در تاریخ ژوئیه 3, 2014 ساعت 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 :)