I have an API which is returning paginated results by calling/products?page=1
for example. The response body however, is not returning any information about the pagination (if there is anything to paginate).
The response with results looks like:
{
"Products": [
{
"Product": {
"sku": "abc"
}
}
]
}
The result of a paginated page without results looks like:
{
"Products": []
}
What would be considered to be the best approach for these kind of implementations where no pagination information is returned in the API response?
I was thinking of storing a pagination param in Alumio’s storage, and increasing it if the products count is >= 1, and resetting it when the count on the Products response array is 0.
There must be a smoother implementation or blueprint.