models/PagingQuery.js

export default class PagingQuery {
    /**
     * Creates a PagingQuery
     *
     * @constructor PagingQuery
     * @param {Object} query - Query with needed parameters.
     * @param {number} limit - Limit amount of items in the response.
     * @param {string} nextCursor - Cursor received in previous response.
     */
    constructor(query, limit, nextCursor) {
        this.query = query || {};
        this.limit = limit || PagingQuery.DefaultLimit;
        this.nextCursor = nextCursor || null;
    }
}

PagingQuery.DefaultLimit = 20;