Class: UserSessionsPage

UserSessionsPage


new UserSessionsPage(items)

A UserSessions Page

Parameters:
Name Type Description
items Map

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

 currentUserSessionsPage.getNext().then((nextUserSessionsPage) => {
   console.log("next user sessions page ", nextUserSessionsPage);
 }).catch((error) => {
   console.error("error getting next user sessions page ", error);
 });

getPrev()

Fetch the previous page if exists

Source:
Returns:
Type
Promise.<Page>
Example

Fetch the previous page if exists

 currentUserSessionsPage.getPrev().then((prevUserSessionsPage) => {
   console.log("previous user sessions page ", prevUserSessionsPage);
 }).catch((error) => {
   console.error("error getting previous user sessions 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