limit method

void limit (
  1. int limitCount
)
inherited

A limit on the number of objects to return. limitCount No of objects to limit you can chain this call by using double dot The limit parameter can be used for pagination, limit specifies the number of objects to limit to in the response.

Example:

var stack = contentstack.Stack( "apiKey", "deliveryToken", "environment");
var query = stack.contentType("contentTypeUid").entry().query();
query.limit(2);

Implementation

void limit(int limitCount) {
  queryParameter['limit'] = limitCount.toString();
}