cloudflare / cloudflare-go

The official Go library for the Cloudflare API
https://developers.cloudflare.com/api
BSD 3-Clause "New" or "Revised" License
1.49k stars 593 forks source link

ListLoadBalancerPools doesn't return Pagination details to impossible to tell if you have more results to go through #1437

Open cdloh opened 1 year ago

cdloh commented 1 year ago

Confirmation

cloudflare-go version

v0.81.0

### Go environment

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/cloh/Library/Caches/go-build"
GOENV="/Users/cloh/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/cloh/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/cloh/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.19.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.19.6/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.6"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/SNIP/backend/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bq/drjvqxkj1xs510c4hfh3d55m0000gp/T/go-build2121482238=/tmp/go-build -gno-record-gcc-switches -fno-common"

Expected output

Either the API to auto paginate or to respond with the ResultInfo so pagination can be handled by end user.

Actual output

No idea if there is another page

Code demonstrating the issue

lbps, err := api.ListLoadBalancerPools(ctx, cloudflare.AccountIdentifier("1234"), cloudflare.ListLoadBalancerPoolParams{})

Steps to reproduce

Try to use the API

References

No response

jacobbednarz commented 1 year ago

yes the method signature does need an update here to align with the conventions. do you want to send over a PR addressing them?