Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Add exhaustive response option to paginated API's #167

Closed
wants to merge 4 commits into from

Conversation

jverce
Copy link

@jverce jverce commented Oct 4, 2020

- Summary

This PR addresses issue #39 that is currently preventing users from using the client whenever they hit an endpoint that contains 101+ records.

- Test plan

Added 2 test cases, both of which where associated to a dataset split between multiple pages

  1. With the new exhaustive option flag turned on, which makes the client retrieve the entire dataset
  2. Without any additional options to the client/API, which returned the first page of the dataset (i.e. compatible with the current behavior)

Also did manual tests by querying listSiteDeploys (which contains 136 records in my case):
image

With the exhaustive flag OFF:

> client.listSiteDeploys({ site_id }).then(r => console.log(r.length))
Promise { <pending> }
> 100

With the exhaustive flag ON:

> client.listSiteDeploys({ site_id }, { exhaustive: true }).then(r => console.log(r.length))
Promise { <pending> }
> 136

- Description for the changelog

Support pagination for list endpoints.

- A picture of a cute animal (not mandatory but encouraged)
image

@jverce jverce mentioned this pull request Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant