Skip to content

Commit 7b77637

Browse files
committed
Added support for checkpoint pagination in get connection endpoint
1 parent 48a750d commit 7b77637

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/main/java/com/auth0/client/mgmt/filter/ConnectionFilter.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,27 @@ public ConnectionFilter withFields(String fields, boolean includeFields) {
6161
super.withFields(fields, includeFields);
6262
return this;
6363
}
64+
65+
/**
66+
* Include the {@code from} parameter to specify where to start the page selection. Only applicable for endpoints that
67+
* support checkpoint pagination.
68+
* @param from the ID from which to start selection. This can be obtained from the {@code next} field returned from
69+
* a checkpoint-paginated result.
70+
* @return this filter instance.
71+
*/
72+
public ConnectionFilter withFrom(String from) {
73+
parameters.put("from", from);
74+
return this;
75+
}
76+
77+
/**
78+
* Include the {@code take} parameter to specify the amount of results to return per page. Only applicable for endpoints that
79+
* support checkpoint pagination.
80+
* @param take the amount of entries to retrieve per page.
81+
* @return this filter instance.
82+
*/
83+
public ConnectionFilter withTake(int take) {
84+
parameters.put("take", take);
85+
return this;
86+
}
6487
}

0 commit comments

Comments
 (0)