Closed garrigou closed 3 years ago
https://github.com/ricbra/php-discogs-api/blob/846f341d3c7c6e811479823daf981b585fa3cd62/tests/fixtures/get_inventory#L15 This is the response that the testcase gets everytime, it will always have per_page=50 and even though the "items" says 479, the response contains only 50 actual listings
Have you tried calling the function with real data? like getting your own discogs inventory?
Thanks for your explanation. Everything works fine ! Sorry !
<?php
require('vendor/autoload.php');
$client = Discogs\ClientFactory::factory([]);
$response = $client->getInventory(['username' => '360vinyl', 'per_page' => 13]);
var_dump($response['pagination']);
Output :
array(5) {
["page"]=>
int(1)
["pages"]=>
int(208)
["per_page"]=>
int(13)
["items"]=>
int(2697)
["urls"]=>
array(2) {
["last"]=>
string(69) "https://api.discogs.com/users/360vinyl/inventory?per_page=13&page=208"
["next"]=>
string(67) "https://api.discogs.com/users/360vinyl/inventory?per_page=13&page=2"
}
}
The _perpage parameter doesn't work in the GetInventory function.
Phpunit result :
Do you have an idea why it is not working ?
Thanks
Clement