ListFunctions: option to disable pagination #509

Merged
jolheiser merged 4 commits from 6543/go-sdk:be-able-to-disable-pagination into master 2021-03-30 20:28:45 +00:00
Owner

the sdk enforce pagination, but most list endpoints dont require it ...

close #507 fully

the sdk enforce pagination, but most list endpoints dont require it ... close #507 fully
6543 added this to the v0.15.0 milestone 2021-03-29 21:00:02 +00:00
6543 added the
kind/enhancement
label 2021-03-29 21:00:02 +00:00
6543 added 1 commit 2021-03-29 21:00:03 +00:00
Some checks reported errors
continuous-integration/drone/pr Build was killed
76685dc779
Add option to disable pagination (if endpoint allow it too)
Author
Owner

tests: infinety loop :/

tests: infinety loop :/
6543 added the
status/wip
label 2021-03-29 21:08:12 +00:00
noerw reviewed 2021-03-30 12:03:54 +00:00
Dismissed
@ -30,2 +30,3 @@
// if you set -1 as page it will set all to 0
func (o *ListOptions) setDefaults() {
if o.Page < 1 {
if o.Page > 0 {
Member

do you mean o.Page < 0 ?

do you mean `o.Page < 0` ?
noerw marked this conversation as resolved
6543 added 1 commit 2021-03-30 16:39:29 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
03396192ea
thanks for @noerw finding my brain damage ;)
6543 added 1 commit 2021-03-30 16:39:50 +00:00
6543 removed the
status/wip
label 2021-03-30 16:52:29 +00:00
6543 added 1 commit 2021-03-30 16:52:58 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
73baa7de63
CI.restart()
zeripath approved these changes 2021-03-30 18:17:35 +00:00
Dismissed
Owner

just need to double check that setDefaults never gets ran twice.

just need to double check that setDefaults never gets ran twice.
zeripath reviewed 2021-03-30 18:20:30 +00:00
Dismissed
@ -31,1 +32,3 @@
if o.Page < 1 {
if o.Page < 0 {
o.Page, o.PageSize = 0, 0
return
Owner

This will only really work if setDefaults can never be called twice otherwise you'll get weird effects.

There may be a better way of ensuring this.

This will only really work if setDefaults can never be called twice otherwise you'll get weird effects. There may be a better way of ensuring this.
jolheiser approved these changes 2021-03-30 20:28:40 +00:00
Dismissed
jolheiser merged commit 7de882b744 into master 2021-03-30 20:28:45 +00:00
6543 deleted branch be-able-to-disable-pagination 2021-03-31 09:18:57 +00:00
Sign in to join this conversation.
No description provided.