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

Correct type for stream api #1066

Merged
merged 1 commit into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1066.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
stream: Update pctComplete to string from int
```
2 changes: 1 addition & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type StreamVideoPlayback struct {
// StreamVideoStatus represents the status of a stream video.
type StreamVideoStatus struct {
State string `json:"state,omitempty"`
PctComplete int `json:"pctComplete,omitempty"`
PctComplete string `json:"pctComplete,omitempty"`
ErrorReasonCode string `json:"errorReasonCode,omitempty"`
ErrorReasonText string `json:"errorReasonText,omitempty"`
}
Expand Down
6 changes: 3 additions & 3 deletions stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
"size": 4190963,
"status": {
"state": "inprogress",
"pctComplete": 51,
"pctComplete": "51",
"errorReasonCode": "ERR_NON_VIDEO",
"errorReasonText": "The file was not recognized as a valid video file."
},
Expand Down Expand Up @@ -98,7 +98,7 @@ func createTestVideo() StreamVideo {
Size: 4190963,
Status: StreamVideoStatus{
State: "inprogress",
PctComplete: 51,
PctComplete: "51",
ErrorReasonCode: "ERR_NON_VIDEO",
ErrorReasonText: "The file was not recognized as a valid video file.",
},
Expand Down Expand Up @@ -304,7 +304,7 @@ func TestStream_ListVideos(t *testing.T) {
"size": 4190963,
"status": {
"state": "inprogress",
"pctComplete": 51,
"pctComplete": "51",
"errorReasonCode": "ERR_NON_VIDEO",
"errorReasonText": "The file was not recognized as a valid video file."
},
Expand Down