new EventsPage(items)
A Events Page
Parameters:
Name | Type | Description |
---|---|---|
items |
Map | map of events fetched in the paginated query |
- Source:
Extends
Methods
-
getNext()
-
Fetch the next page if exists
- Source:
Returns:
- Type
- Promise.<Page>
Example
currentEventsPage.getNext().then((nextEventsPage) => { console.log("next events page ", nextEventsPage); }).catch((error) => { console.error("error getting next events page ", error); });
-
getPrev()
-
Fetch the previous page if exists
- Source:
Returns:
- Type
- Promise.<Page>
Example
currentEventsPage.getPrev().then((prevEventsPage) => { console.log("previous events page ", prevEventsPage); }).catch((error) => { console.error("error getting previous events page ", error); });
-
hasNext()
-
Check if next page exists
- Inherited From:
- Source:
Returns:
- Type
- Boolean
Example
// 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
// currentPage is the current Conversations or Events Page currentPage.hasPrev() // true or false