Preparing search index...

    Configuration for the page to be accessed in a "LensStudio:AssetLibrary".AssetFilter.

        // Pagination controls page offset and limit for asset library queries.
    // Use the static singleBatch() factory -- the constructor is protected.
    const { Pagination, AssetFilter } = await import('LensStudio:AssetLibrary');

    // Create a pagination for the first 20 results
    const page = Pagination.singleBatch(0, 20);
    console.log('Offset:', page.offset); // 0
    console.log('Limit:', page.limit); // 20

    // Attach pagination to an AssetFilter
    const filter = new AssetFilter();
    filter.pagination = page;
    filter.searchText = 'sunglasses';
    console.log('Filter configured with pagination and search text');

    // Fetch the next page
    const nextPage = Pagination.singleBatch(20, 20);
    filter.pagination = nextPage;
    console.log('Advanced to offset:', nextPage.offset);
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    limit: number

    Maximum number of items to return in a single page.

    offset: number

    Starting index for the current page of results.

    Methods

    • Creates a Pagination instance with the given offset and limit for a single batch request.

      Parameters

      • offset: number
      • limit: number

      Returns Pagination