Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamVideo.duration - incorrect type #1096

Closed
2 tasks done
Venoox opened this issue Oct 1, 2022 · 5 comments · Fixed by #1190
Closed
2 tasks done

StreamVideo.duration - incorrect type #1096

Venoox opened this issue Oct 1, 2022 · 5 comments · Fixed by #1190
Milestone

Comments

@Venoox
Copy link
Contributor

Venoox commented Oct 1, 2022

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cloudflare-go version

v0.51.0

Go environment

GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/tomaz/Library/Caches/go-build"
GOENV="/Users/tomaz/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tomaz/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tomaz/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18.5/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.5"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tomaz/GolandProjects/vpl_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/2s/nnn7f20d4md80pjm0wdgdy340000gn/T/go-build1225515982=/tmp/go-build -gno-record-gcc-switches -fno-common"

Expected output

Expected to get StreamVideo struct from the method.

Actual output

json: cannot unmarshal number 5.2 into Go struct field StreamVideo.duration of type int

Code demonstrating the issue

api.StreamGetVideo(ctx, cloudflare.StreamParameters{
AccountID: accountId,
VideoID: videoId,
})

Steps to reproduce

api.StreamGetVideo(ctx, cloudflare.StreamParameters{
AccountID: accountId,
VideoID: videoId,
})

References

No response

@jacobbednarz
Copy link
Member

the endpoint documents this as an integer so i'll need to confirm which is correct from the service team.

@Fumler
Copy link

Fumler commented Nov 2, 2022

Anything we can do to help here? Getting the same error.

@danilobuerger
Copy link

@jacobbednarz The duration returned from the api is a float:

Screenshot 2023-01-22 at 12 36 42

@Schachte
Copy link

Schachte commented Jun 6, 2023

I think we should go ahead and merge:
#1190

I will get the public docs updated this week so there is parity between API response, cloudflare-go and our documentation.

Additionally, I think #1088 from @Venoox will be a good addition I'll help get merged this week as well!

CC: @jacobbednarz 👀

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

This functionality has been released in v0.69.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2023
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 a pull request may close this issue.

5 participants