mrt1m / playstation-store-api

A simple wrapper for working with PlayStation Store API 🎮
MIT License
48 stars 5 forks source link

Issue with pagination #3

Closed volkar1 closed 1 year ago

volkar1 commented 1 year ago

I'm using code from your example:

$client = new Client(RegionEnum::UNITED_STATES, new HTTPClient(['base_uri' => env('PSN_API_URL'), 'timeout' => 5]));
$result = $client->get(
    RequestProductList::createFromCategory(CategoryEnum::OFFERS)
);

$products_list = $result['data']['categoryGridRetrieve']['products'];

And I can see you are using some custom pagination in RequestProductList.php:

public static function createFromCategory(CategoryEnum $categoryEnum): RequestProductList
{
    return new self(
        $categoryEnum->value,
        new Pagination(10),
        Sorting::createFromCatalogSorting(CatalogSortingEnum::RELEASE_DATE)
    );
}

Is there a way to change pages or is it just stuck on first page? If there is, could you update example files, and documentation?

mrt1m commented 1 year ago

I hope these examples can help you