My api response contains a meta element with the pagination data for the response.
{
"meta": {
"pagination": {
"page": 1,
"next_page": 2,
"previous_page": null,
"total_results": 102,
"total_pages": 6,
"per_page": 20
}
},
"body": {
"results": [
{
"id": 530,
"name": "Unlimited Broadband",
// etc
However when the response is parsed into a Resource this data is lost. I can't see it in Muffin\Webservice\Query which makes sense as it's not been executed yet. However when it is executed it will be converted into a Resource, so it's lost then also.
I would rather know from the preceding request if there is a next page or not rather than intentionally making a 404 request to find the last page.
My api response contains a meta element with the pagination data for the response.
{ "meta": { "pagination": { "page": 1, "next_page": 2, "previous_page": null, "total_results": 102, "total_pages": 6, "per_page": 20 } }, "body": { "results": [ { "id": 530, "name": "Unlimited Broadband", // etcHowever when the response is parsed into a
Resourcethis data is lost. I can't see it inMuffin\Webservice\Querywhich makes sense as it's not been executed yet. However when it is executed it will be converted into a Resource, so it's lost then also.I would rather know from the preceding request if there is a next page or not rather than intentionally making a 404 request to find the last page.