The first problem I found was the $limit variable has not been set in StoreFactoryIterator causing the modulo always a division by zero. I chose to keep the limit of 20 because this is the pageSize limit. Also change the 'pageSize' => 20 to 'pageSize' => $limit on access() method.
maxEventIndexCursor
The next problem was the maxEventIndexCursor, there is neither a property nor a method called maxEventIndexCursor, changing the undefined variable to customCursor which is a valid property containing the cursor it keeps the pagination until the end.
Undefined concept ID
The problem here is a bit simple, I got into a similar one crawling through the Chihiro API.
Some content, when querying data through the API could be DISC ONLY or DISC BASED GAME in storePrimaryClassification, it commonly happens in expansions from Rock Band but happens in other old games, as far as I know recent games does not have this problem.
An easy fix is just check if it exists before calling Concept and pass 0 or null in case it does not exist, all the other data will be fetched equally except for conceptID.
The search I made was:
$product = $client->store()->search('crash');
Unit Test
I made a unit test also, but since I'm not so familiar with mocking classes, I think it is a pretty weak test and probably inefficient.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Store Search Iterator
DivisionByZeroError
The first problem I found was the
$limit
variable has not been set inStoreFactoryIterator
causing the modulo always a division by zero. I chose to keep the limit of20
because this is thepageSize
limit. Also change the'pageSize' => 20
to'pageSize' => $limit
onaccess()
method.maxEventIndexCursor
The next problem was the
maxEventIndexCursor
, there is neither a property nor a method calledmaxEventIndexCursor
, changing the undefined variable tocustomCursor
which is a valid property containing thecursor
it keeps the pagination until the end.Undefined concept ID
The problem here is a bit simple, I got into a similar one crawling through the Chihiro API.
Some content, when querying data through the API could be
DISC ONLY
orDISC BASED GAME
instorePrimaryClassification
, it commonly happens in expansions from Rock Band but happens in other old games, as far as I know recent games does not have this problem.An easy fix is just check if it exists before calling
Concept
and pass0
ornull
in case it does not exist, all the other data will be fetched equally except forconceptID
.The search I made was:
Unit Test
I made a unit test also, but since I'm not so familiar with mocking classes, I think it is a pretty weak test and probably inefficient.