Class: MembersPage

MembersPage


new MembersPage(items)

A Members Page

Parameters:
Name Type Description
items Map

map of members fetched in the paginated query

Source:

Extends

Methods


getNext()

Fetch the next page if exists

Source:
Returns:
Type
Promise.<Page>
Example

Fetch the next page if exists

 currentMembersPage.getNext().then((nextMembersPage) => {
   console.log("next members page ", nextMembersPage);
 }).catch((error) => {
   console.error("error getting next members page ", error);
 });

getPrev()

Fetch the previous page if exists

Source:
Returns:
Type
Promise.<Page>
Example

Fetch the previous page if exists

 currentMembersPage.getPrev().then((prevMembersPage) => {
   console.log("previous members page ", prevMembersPage);
 }).catch((error) => {
   console.error("error getting previous members page ", error);
 });

hasNext()

Check if next page exists

Inherited From:
Source:
Returns:
Type
Boolean
Example

Check if next page exists

// currentPage is the current Conversations or Events Page
currentPage.hasNext() // true or false

hasPrev()

Check if previous page exists

Inherited From:
Source:
Returns:
Type
Boolean
Example

Check if previous page exists

// currentPage is the current Conversations or Events Page
currentPage.hasPrev() // true or false