repeat the request, but change requestedGranularity to "count". numTotalResults will be 10 instead of 31, because build_response_summary() spuriously compares total results and pagination limit and returns whichever is smaller.
The fix is to not overwrite numTotalResults with a different value. There were a number of cases and one function parameter that are no longer necessary.
numTotalResults
in the response summary is supposed to show the total number of results found by the query, regardless of pagination (see the spec).In some cases, the reference implementation will spuriously return pagination values instead of the total number of results. Here is an example:
numTotalResults
will be 31 using the example data provided.numTotalResults
will be 10 instead of 31, because build_response_summary() spuriously compares total results and paginationlimit
and returns whichever is smaller.The fix is to not overwrite numTotalResults with a different value. There were a number of cases and one function parameter that are no longer necessary.