Fixing Activity struct for activity count
This commit is contained in:
parent
5b42573ead
commit
a5a129890c
BIN
go_telegram
BIN
go_telegram
Binary file not shown.
22
main.go
22
main.go
@ -79,11 +79,23 @@ func activeSteamers(message *tbot.Message) {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// type Activity struct {
|
||||||
|
// StreamCount int `json:"stream_count"`
|
||||||
|
// StreamCountDirectPlay int `json:"stream_count_direct_play"`
|
||||||
|
// StreamCountDirectStream int `json:"stream_count_direct_stream"`
|
||||||
|
// StreamCountTranscode int `json:"stream_count_transcode"`
|
||||||
|
// }
|
||||||
|
|
||||||
|
// type Response struct {
|
||||||
|
// Data Activity
|
||||||
|
// }
|
||||||
|
|
||||||
type Activity struct {
|
type Activity struct {
|
||||||
StreamCount int `json:"stream_count"`
|
Response struct {
|
||||||
StreamCountDirectPlay int `json:"stream_count_direct_play"`
|
Data struct {
|
||||||
StreamCountDirectStream int `json:"stream_count_direct_stream"`
|
StreamCount string `json:"stream_count"`
|
||||||
StreamCountTranscode int `json:"stream_count_transcode"`
|
} `json:"data"`
|
||||||
|
} `json:"response"`
|
||||||
}
|
}
|
||||||
|
|
||||||
a := Activity{}
|
a := Activity{}
|
||||||
@ -92,7 +104,7 @@ func activeSteamers(message *tbot.Message) {
|
|||||||
log.Fatal(ja)
|
log.Fatal(ja)
|
||||||
}
|
}
|
||||||
|
|
||||||
message.Replyf("Stream Count: %v \nStream Count (Direct Play): %v \nStream Count (Direct Stream): %v \nStream Count (Transcode): %v", a.StreamCount, a.StreamCountDirectPlay, a.StreamCountDirectStream, a.StreamCountTranscode)
|
message.Replyf("Stream Count: %v", a.Response.Data.StreamCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user