Search the Community
Showing results for tags 'search items'.
Found 1 result
-
Hi I want to get all items in the books and magazines catagories from Argentina's site. I'm able to get a response but i only get (because of pagination) 200 items maximum. Is it possible to get all the items?(in this case there are 4 millions items, i know it's a lot.) Here´s my code: <?php require '../meliapp/Meli/meli.php'; $meli=new Meli(xxxxxxxxxx , xxxxxxxxxxxxxxxx); if (isset($_GET['code']) ): $oAuth = $meli->authorize($_GET['code'], 'http://localhost/meliapp/index.php'); if($oAuth['body']!==NULL || !empty($oAuth['body'])){ $_SESSION['access_token'] = $oAuth['body']->access_token; $_SESSION['token_type'] = $oAuth['body']->token_type; $_SESSION['expires_in'] = $oAuth['body']->expires_in; $_SESSION['scope'] = $oAuth['body']->scope; $_SESSION['user_id'] = $oAuth['body']->user_id; $_SESSION['refresh_token'] = $oAuth['body']->refresh_token; } endif; if(empty($_SESSION['access_token']) || !isset($_GET['code'])): echo "LOGIN NOW:<BR>"; echo '<a href="' . $meli->getAuthUrl('http://localhost/hgin/meliapp/index.php', Meli::$AUTH_URL['MLA']) . '">Login using MercadoLibre oAuth 2.0</a>'; endif; $params = array('category' => 'MLA3025', 'limit'=> '200'); $items = $meli->get('/sites/MLA/search', $params); The variable $items only holds 200 items. But i know from inspecting $items['body']->paging->total that there are 4 million items. Is there a way to get all 4 million items at once? or at least more than 200 items maximum per request. Thanks in advance!!!
- 3 replies
-
- search items
- pagination limit
-
(and 1 more)
Tagged with: