mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Use example.com instead of ripple.com Co-authored-by: Elliot Lee <github.public@intelliot.com>
28 lines
710 B
Plaintext
28 lines
710 B
Plaintext
## hasNextPage
|
|
|
|
`hasNextPage(currentResponse): boolean`
|
|
|
|
Returns `true` when there are more pages available.
|
|
|
|
When there are more results than contained in the response, the response includes a `marker` field. You can use this convenience method, or check for `marker` yourself.
|
|
|
|
See [Markers and Pagination](https://xrpl.org/markers-and-pagination.html).
|
|
|
|
### Return Value
|
|
|
|
This method returns `true` if `currentResponse` includes a `marker`.
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
return api.request('ledger_data', {
|
|
ledger_index: 'validated'
|
|
}).then(response => {
|
|
/* Do something useful with response */
|
|
|
|
if (api.hasNextPage(response)) {
|
|
/* There are more pages available */
|
|
}
|
|
}).catch(console.error);
|
|
```
|