Skip to content

Commit

Permalink
channelinfo: fix delay field type
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Jun 12, 2021
1 parent 1562936 commit b53b30b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion channels.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ type ChannelInformation struct {
BroadcasterID string `json:"broadcaster_id"`
BroadcasterName string `json:"broadcaster_name"`
BroadcasterLanguage string `json:"broadcaster_language"`
Delay string `json:"delay"`
GameID string `json:"game_id"`
GameName string `json:"game_name"`
Title string `json:"title"`
Delay int `json:"delay"`
}

// GetChannelInformation ...
Expand Down
3 changes: 2 additions & 1 deletion channels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestGetChannelInformation(t *testing.T) {
http.StatusOK,
&Options{ClientID: "my-client-id"},
"44445592",
`{"data":[{"broadcaster_id":"44445592","broadcaster_login":"pokimane","broadcaster_name":"pokimane","broadcaster_language":"en","game_id":"509658","game_name":"Just Chatting","title":"See you Wednesday 8am for Among Us ^_^"}]}`,
`{"data":[{"broadcaster_id":"44445592","broadcaster_login":"pokimane","broadcaster_name":"pokimane","broadcaster_language":"en","game_id":"509658","game_name":"Just Chatting","title":"See you Wednesday 8am for Among Us ^_^", "delay": 2}]}`,
[]ChannelInformation{
{
BroadcasterID: "44445592",
Expand All @@ -155,6 +155,7 @@ func TestGetChannelInformation(t *testing.T) {
GameID: "509658",
GameName: "Just Chatting",
Title: "See you Wednesday 8am for Among Us ^_^",
Delay: 2,
},
},
},
Expand Down

0 comments on commit b53b30b

Please sign in to comment.