I naively thought they were using some sort of magic when setting the Page value of the returned output (since it was a pointer) but realized that couldn't have worked if it would've got a copy of the pointer instead.
It's possible to use civogo's SendXXXRequest() functions and craft our own URLs:
It seems that some API endpoints that expect pagination don't take it in as pagination.
For example,
/v2/objectstores
expects apage
andperPage
params. However the SDK does not support passing it, theListObjectStores()
receives no arguments, essentially grabbing page 1 only.https://github.com/civo/civogo/blob/v0.3.79/objectstore.go#L58-L71
Compare that function to
ListObjectStoreCredentials
that does take apage
andperPage
:https://github.com/civo/civogo/blob/v0.3.79/objectstore_credential.go#L46-L64
I naively thought they were using some sort of magic when setting the
Page
value of the returned output (since it was a pointer) but realized that couldn't have worked if it would've got a copy of the pointer instead.It's possible to use
civogo
'sSendXXXRequest()
functions and craft our own URLs:https://pkg.go.dev/github.com/civo/civogo#Client.SendGetRequest https://pkg.go.dev/github.com/civo/civogo#Client.SendPostRequest