Class: ConversationsPage

ConversationsPage


new ConversationsPage(items)

A Conversations Page

Parameters:
Name Type Description
items Map

map of conversations 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

currentConvPage.getNext().then((nextConvPage) => {
   console.log("next conversation page ", nextConvPage);
 }).catch((error) => {
   console.error("error getting next conversation page ", error);
 });

getPrev()

Fetch the previous page if exists

Source:
Returns:
Type
Promise.<Page>
Example

Fetch the previous page if exists

currentConvPage.getPrev().then((prevConvPage) => {
   console.log("previous conversation page ", prevConvPage);
 }).catch((error) => {
   console.error("error getting previous conversation 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